Saturday, September 21, 2013

Hammer.js + PhoneGap

PhoneGap developments are coming along well. If you already have a massive HTML5 canvas + JavaScript application (like my customer does) and you want to convert it to an app, PhoneGap may be the tool for you to consider. I have had a lot of fun, and not too much frustration, with developments.

Right now, I am using a library called hammer.js ("You CAN touch this!") for multitouch support. I highly recommend it. One of the only issues I ran into with hammer.js was it's event loop having some issues with JavaScript's event loop, when I (incorrectly) listened for hammer events on the body. When I listened for events only on my canvas, things worked all right.

Below are some images of the app running on my Samsung Galaxy 3S.


App Running. It can be a bit slow with tons of nodes, but is WAY better if my phone isn't running a ton of other crap. We're doing all the rendering in JavaScript. 


After a pinch-to-zoom.


Click on a node, and bring up information about them...


...and edit a node to bring up the on screen keyboard.


Or rotate your phone if you like landscape more.


I've been very happy to work on this project with a fun customer, that is paying me to learn about PhoneGap development and make a cool app. Eventually we may try deploying this on an iPad!

Monday, September 16, 2013

Ask A Programmer - Part 1

Since starting my own custom software development company, I occasionally pick up small gigs on different programming sites like oDesk, Freelancer, and Fiverr. On one of those sites, someone offered to pay me to answer five six (after an additional question) questions for them. Since I write blog posts basically for free I decided to take this customer up on his offer. Below are his questions, and my responses.

This customer asked me about 'trust seals' in an email before he actually asked his five below questions.

1- Is it possible to have a badge shown on the url area. there is usually a site lock and ssl verification, what is the process of adding one of your own? say on the right?

A trust seal is basically an image that says your website is trusted. Most modern browsers show images in the URL area when a site is using a properly signed (by a trusted organization, not a self-signed) certificate for SSL. These type of trust seals are built into the web browser.

However, you can show other icons to represent the page. The favicon is an icon that people use to show a quick, small, image representing the page used for shortcuts. With modern browsers, those are not shown in the URL area, but along the title bar, or with the tab. I believe they USED to be shown in the URL, but a quick test on modern IE, modern Chrome and modern Firefox show that is no longer the case.

As far as I am aware, it is not possible to show icons in most standard browsers in the place the 'lock' (for recognized SSL sites) or the 'broken lock' (for sites that have SSL problems) go. 

However, I sometimes like to add the W3C validated image on a site that I make, after the W3C validation engine validates it. That is the only trust seal I've ever put into my site, and I put it in just as an image when I'm writing HTML. This is not in the URL area though.

I have no idea if this website is valid or not. I just added the trust seal here. 

2 and 3 - server and website verification( as i read on wikipedia ) performs tests on servers and websites to ensure that they are not vulnerable. Are these web crawlers that do this? What program scans so intensely and how do you go about creating one?

There are web crawlers that do this. Most of these crawlers are created by malicious individuals, and/or government organizations that want to find vulnerabilities and exploit them for their own purposes. Metasploit is a well developed program which will automatically attack targets using a set of canned exploits. Another program which is useful in fingerprinting systems to determine which versions of programs (services) they are running is called nmap.

Whenever I've created something like this, I used a programming language called Python  and a package called BeautifulSoup to scrape and post to websites. Basically, any programming language can be used to accomplish this, but some are better suited to accomplish it quicker. Depending on what people are targeting, they will use a combination of unknown ('zero day') exploits and widely available, extremely well know, vulnerabilities.

If you run a server online, and you run a service called secure shell (ssh), you will immediately (within 10 minutes) start seeing people 'rattling your keys' with common username / password combinations trying to login to your system. Whenever I put together a website using a system called Drupal, I start seeing bots (web crawlers) signing up for accounts, and posting random crap to the Drupal site. These are pieces of malicious software trying to exploit, trying to be annoying, or just put together as an experiment for someone to learn from.

All of this is a reason to keep your software up to date, and run software that you trust.

5- instagram app, being able to upload to different social networks and managing different accounts in one place, like instagram or whatever. Such platforms seem very easy to build or create, but are they? are they expensive to build and maintain?

Social networks that have millions of users are extremely complicated pieces of software. They rely on gigantic server farms, and took lots and lots of time to build. They are very time consuming and difficult to build and maintain. If I remember the Facebook book correctly, it took Mark Zuckerberg like 6 months of programming all the time to get Facebook even kind of usable, and he sounds like he was a bad-ass. Even then, they had a few servers and multiple programmers working on Facebook full time. Building a social network is not easy. I spent some time working on a project using a tool called Social Engine for a customer, and that was my one clear failure in the year of programming. That failure happened for a variety of reasons, but one reason was that the software for that is extremely complicated (and I did not know much about Zend, the underlying system on which it was built.)

This may not be true for small social networks built on top of Drupal or WordPress but eventually if your social network continues to grow you'll have to hire some super smart dudes.

6 - Like you I am an entrepreneur and the questions I asked before where purely for research. What I want to know is how willing are people in your end of the world ( America) willing to adopt new products. I live in Botswana and before I launch anything I always second guess myself because in Botswana, its not only super behind on technology it's also super conservative and.. well pretty african.
So how willing are businesses and people in general willing to try out new products given the times you find your self in? Just your opinion.

People in the United States are willing to try new technological and business things very quickly, if properly sold on the concept. I believe our technological skills in the United States are the best in the world, and so are our sales skills. American salespeople are always trying to convince potential customers to try something new (as long as you speak English.) We are always looking for ways to do things more efficiently, with more profit, less waste, and more fun. Our minimum wage is very, very high, which discourages companies and individuals from hiring minimum/low wage people. It is much more efficient to try and replace a low skill, minimum wage person with technology even if somewhat more expensive, because software and robots do not cause any of the problems that people can in our society. The high minimum wage, combined with the the pragmatism Americans have, make it so we are interested in trying new products, especially if they can go back to the old way if the new way isn't any better.

Thanks!

Friday, September 13, 2013

A Year Later : My Experience as a Mercenary Coder in Albuquerque

A Year Later : My Experience as a Mercenary Coder in Albuquerque

Today I gave a presentation for the 2013 Albuquerque Tech Fiesta. This presentation went well. It would have been good to prepare my introduction a bit more, but overall I've been happy. Here is the blurb promoting my speech, and below is the speech.

Introduction
Thank you all very much for coming to listen to my talk, “A Year Later: My Experience as a Mercenary Coder in Albuquerque.” My name is Brian Stinar, and a year ago I quit my 9-5 job to open my own software company called “Noventum.” I always like before-and-after pictures. Before I get really started in my talk, I want to show everyone a before and after picture of me.

Before (as an employee)

After (as an independent contractor)

I’ll introduce myself, give you guys a bit of background, go over some definitions, and then quickly summarize what my talk will be about today. Then, I’ll talk about it. After I finish talking about it, I’ll summarize what I talked about, and then have some time for questions. I tend to like predictable structures. No surprises here.

I’m basically as local of a New Mexican as it’s possible for someone to be, if their family hasn't lived here for six generations. We moved to Silver City, New Mexico, about 16 years ago. I went to high school outside of Silver City in  Cliff, New Mexico, did my undergrad in computer science in Socorro at New Mexico Tech, and then came to UNM for my master’s, also in computer science.

Before starting my own company, I worked full time for three years after completing my master’s. My first year out was at a small web development company called Leader Technologies. Leader Tech built product registration software. If you've ever bough a Logitech mouse or keyboard, a Kodak printer, an nVidia graphics card or any Adobe software, you’re probably receiving a spam marketing message a system I worked on sent you. After Leader Tech, I went to work for a computational fluid dynamics software company, located in Santa Fe, called “Flow Science.” At Flow Science, I learned a ton about object-oriented software development using a programming language called C++, as well as accomplishing technical objectives in a political environment. I’m grateful for all I learned at both these jobs.

Definitions
I like to define the terms I use. By “Mercenary coder” I mean freelance, or contract programmer. This means NOT an employee programmer. I try to avoid being treated like an employee, or taking any actions that the IRS would consider grounds for re-classifying me as an employee. Having my customer specify the place (their office) or time (9-5) of completing my work is THE major action that would result in me being treated like an employee. Reclassification sounds like a very painful and possible expensive process. As a programmer, I build software solutions for people using programming languages. I’m getting more and more into content management systems (like Wordpress and Drupal), which are not programming but still very useful.

My contract jobs tend to be hourly, but if my customer is able to provide a well specified project, I like to bid it out as a project. Often times, this is not possible because of unclear specifications though.

For example, a porn site. The porn site was EXTREMELY well specified. The customer had everything photoshopped, and very clearly specified. I ended up turning that job down, but it was VERY well specified.

It’s just me. I sometimes work with other contractors, and when I was extremely busy I looked at hiring an intern. But it’s just me.

Overview 
What am I going to talk about today are my experiences during this year, and slightly before. I want to first go over the reasons I decided to go out on my own. After that I’d like to describe some of the challenges I’m still facing, like keeping my sales pipeline full and taxes. Then I’ll go over some areas I feel like I’m doing decently well in such as saying no to customers (or potential customers), accounting, and marketing. The last thing I’ll go over will be where I see myself going in the next year, and beyond. We still should have some time left at the end for questions, unless this goes WAY longer than I rehearsed.

Why Did I Go Out On My Own
I became bored at both my full time jobs pretty much as soon as I became very proficient. This increasing productivity did not ever result in getting paid more. I’m convinced that the only jobs that are actually paid according to their productivity as sales jobs. With programming, it’s difficult to measure exactly someone’s productivity, as it’s possible in physical manufacturing jobs, but it’s still possible to get an idea. If someone is cranking out tons and tons of code, and not being compensated accordingly, that person seems like someone that I could convince to give contracting a try. With owning my own company, I am paid EXACTLY how much value I contribute to my customers. Check out this image with salaries I put in for values I think are reasonable. This is my mental model of the career path available in New Mexico.



I did not want to continue to put time into the above graph, to make my income and responsibilities go up marginally.

I like learning. It’s fun for me to work on new technical projects, and solve problems for people in new ways. I wanted to learn all about running a business, and being in business for myself. That’s another major reason I started my own thing. This is the most I have learned in a year since I left college. It’s fun to grow.

Another reason is that I live a broke-ass lifestyle. Seriously, this was a major reason that allowed me to start up my own thing. The extremely inconsistent income from contracting (which I am going to talk about next) does not go well with a number of financial responsibilities. I do not recommend you start your own company if you have family members that depend on you. My family members are my parents, and my adult sister. None of them depend on me financially, so I was not neglecting my duties to try and start this up.

Challenges I’m Facing (work on transition)
The major challenge I face is managing my sales pipeline. This is different than making money, or getting sales. The mistake I’ve made twice has been to stay super focused on sales, then as soon as my leads start turning into sales, I neglect all future sales. Guess what happens after those projects finish? I have no new projects to work on and it takes a month for me to ramp up prospecting and converting leads into sales.

Sales Line. Don't Do This.

Sales Cycle. Do This.


This sales cycle image I grabbed from Google Images shows that sales should be a cycle, not a “start” and “end” with an arrow between. The ‘sales arrow’ instead of the ‘sales cycle’ is a problem I’m trying to avoid.

Sales needs to be a continuous process, not a ‘one-and-done’ thing you worry about when you’re finished with your existing customers. Every day I try and focus on sales for an hour, or more. I have developed relationships with existing customers to make this not as pressing, but a large portion of my projects tend to end when the project is finished, which makes sales completely necessary. These are extremely basic sales lessons, but it’s something I have to focus on and continuously try to improve on. My friends that have actual sales experience laugh at how basic of a principle this is, and I have to agree with them, but it’s still something I have to be mindful about.

The other issue I’m trying to focus on are my taxes. My tax bill this April was a gigantic surprise. This is because I did a poor job of planning my tax liabilities. Taxes are 100% predictable. My problems with taxes were caused getting my accountant all of my information not early at all, not paying any anticipated withholdings (which only resulted in a < $100 fine) and in using my accountant as someone to help me find creative, legal, tax deductions instead of as a tax and financial planner. My accountant used to be an IRS auditor, so he always has cool suggestions on legally avoiding taxes. If I had a gigantic pile of cash I earned, a ‘surprise’ bill like this wouldn’t be an issue. However, planning on being so profitable that certain segments of running a business can be completely neglected doesn't sound like a good idea to me. Moving forward, I am trying to proactively plan my tax liability so surprise tax bills are a thing of the past.

Things I’m Doing All Right In
By this point in the talk, I hope it is clear I am not an expert businessman. However, there are a few things I feel like I have focused on a lot, and am not doing horribly wrong.

One thing I feel like I’ve been well prepared by New Mexican universities, and my jobs, to do well is to solve my customer’s problems. That has to be the first thing in any business - customers giving you money are getting more value for what they get in return. I feel like with the vast majority of my customers, this has been true.

Saying “no” to customers is another thing I’ve had to become good at. Most customers I've dealt with have been extremely awesome to work with. Sometimes though, a customer isn't the best fit in the world, or they really aren’t that great to work with. A bit of my business comes from online contracting sites like oDesk, Fiverr or Freelancer (check my out on there, if you’d like.) Sometimes customers on those sites want me to do immoral/illegal things, or more commonly things that would be impossible or not feasible with the resource constraints they've given me to work under. Saying “no” online is much easier than saying “no” in person, but I've had to do both.

Accounting is something that I think is EXTREMELY fun. It’s basically like debugging a computer program, with money. If your books don’t match your bank account, you keep studying your books until you find the error. Being aware of where every penny goes to is extremely helpful for me. I use Quickbooks Pro, and had an ex-girlfriend that helped me a bit getting it setup. Plus, I had ONE accounting class a few years ago which helped me understand what I was trying to do.

I’m progressing with marketing in a meaningful way. Marketing is defined as promoting and selling, which is helpful in keeping my sales pipeline full and balanced. The UNM business library has a lot of great books on marketing, and I’ve been learning from one of my customers that has more sales experience than I do. This is the one I still need to work on the most, but I feel like I am moving forward. My speech today basically grew out of my (rough) marketing plan. My friend Travis (from POS Lavu, name dropping) and I thought giving an interesting speech about my experiences would help me find new customers.

Where Do I Want To Go
Ultimately, I’d like to have a product. Right now my product is my time which I can sell because of my skill at software development. That will not scale very well past about 50 hours / week. When I become extremely busy, I have my friends or other contractors, help me out. Still, that doesn’t scale well. My goal is to have a product that scales.

To build a product, I’d like to build a team. I’m good at programming, and not-horrible at business. As a programmer, if I’ve been able to hold your attention this long and not completely alienate you, that is pretty amazing too. However, I don’t have all the skills needed for developing, marketing, supporting, and growing a product. I’m very happy to have had this past year to develop skills that will help me with a product.

Questions?