Monday, July 10, 2017

Desert Rose Jewelry

Help support this site by visiting Desert Rose Jewelry.

If you need to buy earrings and bracelets for yourself or significant other Desert Rose has hundreds of ready-made jewelry or can make custom jewelry for you.

Wednesday, March 2, 2016

Desert Rose Designs - Ironwood Carvings, Jewelry and Minerals

My wife started a new business Desert Rose Designs which sells ironwood carvings, handmade jewelry and minerals from all over the world.

If you enjoy this site, please, consider going visiting Desert Rose Designs and purchasing something to show your appreciation.

Sunday, January 3, 2016

Mentees Wanted

I know it has been a long time since I posted to this blog. Basically, I have been working on other things, most notably my sports analytics and prediction site, Snoozle Sports, and my wife's business, Desert Rose Designs.

I will be teaching CSCV 471: Introduction to Artificial Intelligence and INFV 301: Introduction to Informatics at the University of Arizona this spring and I will post some of my notes and lectures on this site, if you are interested in following along. Looking at my class enrollment, most of the students in the class, while I believe deserving to be there, were men with apparent northern European last names. I have wanted to see more women and underrepresented minority groups in my classes since I first started taking computer science classes in college in 1998, almost twenty years ago. 

There has been complains about the lack of diversity for as long as I have I been in tech. Not only does a better gender and ethnic diversity promotes equality, it also gives a competitive advantage to the companies because it increases the employee and customer networks for an tech institution.

While I have encourage many of my classmates, co-workers, and students that are struggling in their programs, but I feel I can do more. While I am a white male, I want to be a more active ally to people that are interested in a career in the tech industry, especially ones from disadvantaged groups. I asked myself what else I can do, and I want to mentor 2 or 3 people.

I'll be reaching out to my students, but if you or someone you know that lives in the Tucson area, are interested in becoming a software developer or a related field, please contact me via DM on twitter, @gmwagner. I ask of the mentee to meet with me every month where we will initially set goals, then subsequent meetings we will discuss the progress toward those goals. Also, if the mentee needs help with classes or finding work, I will work with them on that as well. I ask the mentees as they matriculate and start their careers they mentor people as well.

What I will get out of it? A network people that will keep me (or make me) up to date on the current trends and a network of potential employees when I start my own company.

Sunday, April 19, 2015

How to Build a Multipack Heroku Application with an R Server

There are many instances where you may want a multipack Heroku application where you would want to have R in the background to do the heavy lifting for data processing, and another language to handle the web services.

To do this you need to do is set your BUILDPACK_URL to There are two ways to do this:

  1. Via commandline type: >heroku config:add BUILDPACK_URL= 
  2. On your Heroku app dashboard under Settings>Config Vars click Edit. There are two blank text boxes on the bottom of the existing Config Vars, type BUILDPACK_URL for the KEY and for the Value then. type click on the plus (+) to the right of the blank text boxes, and click Save. 
There is more information on buildpack-multi on its git page.

Then create a text file in top directory of your local build called .buildpacks. In .buildpacks type the buildpack git URLs for the languages you will be using, for example with R and python the .buildpack looks like the following:

where is R buildpack and is the python buildpack. The value after the # is the version number. If you are using cedar-14 as your heroku stack make sure you have the #cedar-14 after the build pack. During the slug complication, the compiler opens the file init.r in the top level of your directory, put code to install any package here. The r-buildpage git page has more details on this buildpack.

Finally, you will need a command to tell Heroku how to start your server. I created the file rserve.r:


# get the port allowed
port <- Sys.getenv('RPORT')

# run Rserve in process
run.Rserve(debug = FALSE, port, args = NULL, config.file = "./rserve.conf")

where I set RPORT as my Heroku CONFIG VARS and reserve.conf contains the rserver parameters.

And in my Procfile I added the command
rserve: R -f rserve/reserve.f --gui-none --no-save –RS-conf
to run server. I used the rserve documentation page to find how to connect to rserve in the language my web server was in.

Unfortunately, the R buildpack takes up a good chunk of your slug memory, about 200 MB, so you need to keep that in mind; as well as, every RServe connection is like a new instance of a R sessions so you will have to download install the libraries as needed which can be time consuming. 

I hope this helps you to get started.

Sunday, May 4, 2014

Stephen Hawking is Wrong About Artificial Intelligence

For probably the first and last time in my life, I feel Stephen Hawking is wrong about something scientific.

Stephen Hawking wrote a column for The Independent warning about the risks of people taking artificial intelligence (AI) going too far. The sentence that Dr. Hawking wrote that caught my eye as incorrect was, “..., there are no fundamental limits to what can be achieved: there is no physical law precluding particles from being organised [sic] in ways that perform even more advanced computations than the arrangements of particles in human brains.”

This is not correct, while computers are fast and can do calculations faster than man, AI is boiled down predictions based on statistics and classification algorithms. While good predictions are right most of the time, they are still wrong sometimes.

AI algorithm are wrong because the world is still dynamic and unpredictable. AI will never be prefect because of nature and human free will. AI will make mistakes, and AI systems needs a human to verify and train the system. The bottom line is there needs to be someone there to be kept accountable, and with this. humans are needed whether de jure or de facto for a society-wide acceptance of AI. Dr. Hawking later in the article states his main point, that we need to understand how AI will affect our lives, and I totally agree with that and I think society will evolve to make the policy and legal decisions for such.

These societal rules will come in place because its human nature to blame someone for mistakes.

There will always need to be someone responsible for AI mistakes whether it is an errant autocorrect in your text message to your Mom or mistaken airstrike from an armed drone. There will always need for someone to stop the buck. When thinking about AI remember there will always be someone there wanting to cover their backside.

No Skynet is not coming and it will never come. AI will never totally take over the world. The need for CYA overcomes any AI.

Friday, April 25, 2014

College Athletes Should Be Paid $92,000/Year

By my calculations, the average college college should be making $92,000/year. How did I come to that number? I compared the average salaries of other professional athletes to the amount of revenue their leagues brought in to get a ratio of how much an average salary for an athlete should be.

In the table below I have the estimated revenue, average salary, and my estimate of the total league players salary and ratio of salary/revenue for each of the four major North American Leagues

League Revenue Average Player Salary/Year Estimated Number of Players Estimated Revenue Per Player Ratio of Salary to Revenue
NFL $11,000 mil $1.9 mil 1696 $6.48 mil 29%
MLB $7,000 mil $3.3 mil 750 $9.3 mil 35%
NBA $5,000 mil $5.2 mil 450 $11.1 mil 45%
NHL $3,300 mil $2.5 mil 810 $4.07 mil 58%

The revenue and salaries were from the Major Professional Sports Leagues in the United States and Canada Wikipedia page and the number of players in the league was calculated as the roster size of teams (53 NFL, 25 MLB, 15 NBA, and 27 NHL) multiplied by the number of teams per league (32 NFL, 30 MLB, NBA, and NHL). The range of league ratios ranges from 29% to 58%.

As a note, the NFL collective bargaining agreement is 47%, so either the numbers are off, or the NFL has revenue that is not part of the collective bargaining, and it looks like the NHL union has done a great job with negotiating with the league.

Using this knowledge I calculated what the salary NCAA athletes should be making by estimating the revenue of a NCAA D-1 athletics departments at about $4,800 mil. I got his number from the ESPN college sports revenue and expenses from 2008. The median revenue was $40 mil for 2008 and I multiplied that by the number teams at 120. Then I estimated the number scholarship athletes at a school to 150. This number is rough since schools have varying sports per school, but I figured 68 football, 30 both basketball teams, 20 baseball and softball, 10 swimming, 10 tennis, and 12 as fudge factor. I decided a fair wage would be about 30% of the athletics department revenue based on the fact that college athletics is not the cash cow professional sports are and there is more overhead in the athletics departments. For the year 2008, that would put a fair salary at $80,000/year for 2008. With an growth estimate at 2% for 6 years that would put athletes at about $92,000/year for 2014.

Also, median revenue/athlete in NCAA D-1 is about $300,000, I feel paying athletes is just plain fair. Undergrad research assistants help professors generate income through research and they get money, graduate teaching assistants generally get a scholarship plus a stipend for their teaching and research efforts, why are college athletes getting their only getting their tuition and room and board paid for? At my alma mater, New Mexico State Universtiy, the athletic department brought in $25 mil for 2008, and I estimate the average football player with tuition, books, room and board cost the university about $20,000, based on 150 athletes thats about $ 3 mil in expenses, or salary athlete expense to revenue ratio of 12%. NMSU's athletics program is dwarfed by programs like Alabama or Texas where the ratios will be even lower at about 5% athlete expense to revenue ratio.

I propose the NCAA schools pay their students a flat salary across the board on top of their scholarships, say $45,000/year (which is more than I made as a grad student) plus the scholarship students would be earning at the school. This will be the salary per scholarship player across all sports to keep in the spirit of Title 9. This flat salary would prevent rich schools like Notre Dame or Alabama from buying players off. Also, the money would encourage students from dropping out due to the higher opportunity costs. I know in sports that are not football or basketball, coaches can split scholarships across multiple players, the coaches can still do that for those sports.

This is America, when people participate in the capitalist system they should be compensated for their hard work, and I think college athletes are not getting their fair shake.

Thursday, October 3, 2013

Link to Big Data Article

I have not posted in a while due work picking up and the fact that I am back teaching two classes at Pima Community College (Introduction to Assembler and Introduction to C#). However, I wanted to post this great article about from Wired, Big Data is Too Big for Scientist to Handle Alone.