Thursday, December 1, 2016

Language vs Language

When I was younger I took a number of classes in Spanish and French. When I was 19 I spent a month in France trying to absorb the language.

Recently I have been watching 3%, a series on Netflix that is in Portuguese. When I visited Spain I was amazed by the different languages spoken there. And I feel Portuguese is a language that has many differences compared to other languages.

For example, the work 'porque', which is also same in Spanish. This is translated as 'why', but I feel that has so much more meaning in Spanish and Portuguese.


Friday, November 25, 2016

Data Science Certification with Coursera

For the past year I've been working on a Data Science Certificate with Coursera. At first I was really excited about it. But as I've taken 9 classes toward the certificate I've gotten a little jaded. This is due to a few factors:

1. Cheating - The forum moderators have complained about the number of people who simply cut'n'paste from other website and submit that as their work. Which degrades what I have done.

2. Lack of Real World Knowledge - When I look at job openings in Data Science, I see they require developers with skills that are not at all related to the languages and exercises I've been doing for the certificate.

Link to one project I did for the classes I've taken:
http://rpubs.com/earlbingham/177552


Monday, September 19, 2016

First 10 out of 10 on Hackerrank

My first 10 out of 10!


import java.util.*;

public class Solution {

    public static void main(String[] args) {
       Scanner scanner = new Scanner(System.in);        
       String numArgsStr = scanner.nextLine();        
       double numArgs = Double.parseDouble(numArgsStr);        
       String integers = scanner.nextLine();        
       String[] integersArray = integers.split(" ");        
       double pos = 0.0;        
       double zero = 0.0;        
       double neg = 0.0;        
       for (int i = 0; i < integersArray.length; i++) {    
         int j = Integer.parseInt(integersArray[i]);            
         if(j < 0) {
                neg++;            } else if(j == 0) {
                zero++;            } else {
                pos++;            }
       }
       System.out.println(printDiv(pos, numArgs));        
       System.out.println(printDiv(neg , numArgs));        
       System.out.println(printDiv(zero, numArgs));    
    }

    static String printDiv(double num, double den) {
        if(Double.toString(num / den).length() > 8)
           return Double.toString(num / den).substring(0, 8);        
        else            
           return String.format("%-8s", Double.toString(num / den)).replace(' ', '0');    
     }
}

Friday, May 27, 2016

SailsJS

Just finished reviewing a book on SailsJS for Manning. The book was very fun to read and I learned a lot about JavaScript development. Last year I had worked on a couple of AngularJS projects, so it was refreshing to see a framework that could save a lot of time compared to Angular. http://nathanleclaire.com/blog/2013/12/28/the-good-the-bad-and-the-ugly-of-sails-dot-js-realtime-javascript-mvc-framework/ Nathan does a nice review of the frameworks in his article.

Monday, March 28, 2016

Coursera Class Online - Truly International

Just took my 4th Data Science class with Coursera and John Hopkins University. Thought this graph was interesting in regard to the number of students taking the same class at the same time. Amazing how you can take a class with 1100 other people all over the world. Yet I only had brief interaction with any of them. In which I had to grade some of the other students work.



Tuesday, March 22, 2016

Owning a Top 10 Website

17 years ago in a previous life I was the owner of righton dot com. When I would tell people that, they wouldn't believe I owned such a potentially lucrative website. This was when simple website names like that were selling for hundreds of thousands of dollars. In which a company in Oregon that had a device locking system sued to for the hostname. Back then I had a lot of free money and spent over $25k to keep the website URL.

What was interesting was the volume of emails I would receive. I had it setup so that if any email that went to XXX@ right on doc com would go into my email server. There I could filter through thousands of emails I would receive each day. I wrote filters that I applied so that I could find real emails compared to fake ones.

One interesting set of emails was some drunk guy in Australia who was trying to email a girl he had met. Obviously she had given him some fake email address and he kept emailing her, trying to apologize or something.

Monday, February 22, 2016

Why Tomcat Sucks

I've been a java developer since java first came out. During that time I have had to use HTTP protocol a lot, and with that Apache Tomcat. Initially I enjoyed how the JAR/WAR/EAR file would be used in a Tomcat container and have an uncompiled version in the 'work' directory.

Last year I had a new project where I could use whatever I wanted for the back-end. One of the first times I could choose. Since the project didn't have to scale to a high level, performance wasn't a primary concern. The HTTP calls did have to support the ability to upload and download excel type of data. So that needed to be fast, and I actually worked on 3 different ways to do the upload and download to see which would be faster. JSON, XML, and raw SQL.

All of this work I did using Python and Django, which I felt I was able to accomplish the work 3x faster than if I had written the same code in Java. Also the code was more self describing and would be very easy for a junior developer to review and pick up compared to its Java equivalent.

Here is a list of the things I think Python/Django is better than Java/Tomcat:

1. Real time compilation - I write a line of python, save the file. And the Django server automatically restarts with the new code. I know you can do the same thing using JRebel, but I have found that its a pain to support with various versions of Java and Tomcat. Also the Sales people at JRebel will call you almost every day asking if you plan to purchase the software, and/or how is the software going?

2. Self Describing Code - I felt the python is much more concise and easier to read. Decorators in Python are much more intuitive for security compared to Java annotations.

3. Online Documentation - Here is where I think Python shines compared to Oracles ancient documentation.

4. Native JSON Support - Having a JSON be a Dictionary object in python is awesome. In which a developer can easily stream a JSON request/response to a Dictionary object. Then do complex collection operations on the object.