Nov 28 2011

Retweet October 2011

From time to time I just blast tweets about software development, project planning, team dynamics, or whatever else comes to mind. Here is a synopsis of recent tweets and rants. If you want to follow the conversation follow me at techknow and/or juixe.

Software Development

  • To checkin or not to checkin a large changelist five minutes before you go home, that is the question?
  • A test like a good movie, has three parts: the setup, the car chase, and the test of the results.
  • Testing is like a tax, you have to pay 5-10% to have a good running infrastructure or system.
  • Testing takes time, make sure you make the time, because it will save you time in the long run.
  • All programmers have a black belt in hubris.
  • One bytecode to rule them all.

Thought Leadership

  • Your miles may vary, but it often depends on your attitude.
  • Passion + Perseverance = Possibilities
  • Sometimes you can’t afford to lose a client, but there are other times you can’t afford keep your client.
  • Just like there should be no hard coded strings there should be no unwritten rules, or assumptions, or specifications.
  • The dumbest people I’ve ever encountered are those that think that the rest of the 99.99% of people are a bunch of idiots.
  • If you are unique no one can compete with you.
  • Team meetings should not feel like an AA meeting, “Hi, I’m bob and I work here.”

Product Placement

  • I’ve used the iPhone apps for Google Voice and G+ and I have to say, Google does not know how to make a good iOS app.
  • I’m not liking the new Google Reader look. I would not be surprised if the next version of Google design has ribbons.
  • Leave no smart phone behind. Google won’t upgrade the Nexus One to Android 4.0.
  • Google is set to update its motto to “Do no evil if you ain’t getting paid for such evil.”
  • Android is to Google what Internet Explorer was to Microsoft in the Browser Wars. MS gave IE for free just to take out Netscape.
  • Siri is to Apple what Kinect is to XBox what Facebook Connect is to Facebook what Circles are to Google Plus…
  • Every time I upgrade a MS product an angel loses his wings.
  • Is Amazon also adopting social networking features? I just noticed that Amazon has a like button on its product pages.
  • Facebook should update its mission “to trick people to over share and make the world more open, connected, and trackable.”
  • Google should update its mission “to organize the world’s information about our users and make it accessible and useful to our advertisers.”
  • @att has two options in terms of text messages. Pay as you use for $0.20 or unlimited for $20. What about a third option, disable texting altogether?
  • Why does it cost half of the price of a stamp to send or receive a text? It’s endemic of an industry that has no competition or innovation.
  • The Kindle Fire tablet is a modern day physical shopping cart for Amazon’s virtual online store.
  • History is being made every day, yet @historychannel airs reruns of Ancient Alien.

Quotes

  • OH WOW. OH WOW. OH WOW. – Steve Jobs’ Last Words
  • I’m so embarrassed. I wish everybody else was dead. – Bender Bending Rodriguez
  • Goodbye monobrains – Bender Bending Rodriguez
  • There is no recession for great companies… – Jason Calacanis
  • Software is like sex: it’s better when it’s free. – Linus Torvalds
  • Coming together is the beginning; keeping together is a process; working together is success. – Henry Ford
  • When all men think alike, no one thinks very much. – Walter Lippmann

Randumb

  • On Monday mornings we are all zombies.
  • Why am I listening to old school British punk rock? #GodSpankTheQueen
  • The truth is that truth is absolutely relative.
  • And then God said, “Let there be bacon,” and there was bacon. God saw that the bacon was delicious.
  • You’re so vain, you probably think this tweet is about you.
  • Fist pump for peace.
  • Anybody that gets lost in a corn maze is an absolute moron.
  • I hate Lifetime movies!
  • Business is legitimate thievery.
  • Some of the most common elements on earth idiotum and dumbtonium.
  • meta-disrupt: Disrupt those disrupting disruption.
  • I am, therefore I meme.

Thought Equations

  • Meaning > money
  • problem = opportunity
  • means != ends
  • Success > Perfection
  • Experience != Information
  • Thinking > Knowing
  • Do > try
  • Platform > product
  • Creation > criticism
  • Passion + Perseverance = Possibilities

Million Dollar Ideas

  • Million Dollar Idea: Online Speed Dating Site
  • Million dollar idea: a news channel with nothing but news tickers…
  • Million Dollar Idea: self cleaning floors.

Nov 16 2011

How Apple Saves Millions on Transaction Fees

I’ve joked before that Apple has more revenue sources than they do products. In addition to having great profit margins on hardware they also do well on the Apple iTunes music and app store. In addition to these, Apple brings millions with it’s developer program, with costs $99/year. Since Apple has been doing well with it’s traditional business and because Apple is so private about it’s business I feel business analysts have not had the spotlight on other aspects Apple’s finances, such as how they save millions of dollars a year on transaction fees.

Have you ever notice that when you buy a $0.99 song on the iTunes music store you may be charged two or three days later? I’ve noticed that when if I purchase a movie on a Friday and a song on a Saturday, I often don’t get charged until the following Sunday or Monday and when I do both items are charged together. How does this save Apple millions? Typically, when you have to process a customer’s credit card to charge for goods or services, the bank or merchant account that processes the credit card will charge around $0.20-0.30 per transaction and an additional percentage of the total cost after a certain amount. This is why some small business don’t accept credit cards for less than some amount, like $5-10 dollars. If you are processing credit cards for your digital goods online store, PayPal charges a transaction fee of $0.30 plus 2.9% of the total price.

I’ve positive that Apple has negotiated the transaction cost to less what a brink and mortar business would have to pay, but as an example let’s say they pay $.10 per transaction. If you buy a $0.99 song on iTunes Apple still has to pay a transaction fee for charging your card, in this case $0.10 or 10% of the total charged. If you buy two songs over a span of two days and Apple bills you for the both of the $0.99 songs together, Apple will still only pay the $0.10 transaction cost to process the credit card, or just 5% of the total price.

This is why when you purchase items from iTunes it maybe be several days before you are charged, because it is better for Apple to charge you for multiple items than to charge you for individual songs separately.


Nov 14 2011

jQuery Mobile + PhoneGap = Awesome Mobile Development Platform

I’m currently prototyping an iPad application and I’ve just found working with jQuery Mobile and PhoneGap to be a breeze for mobile application development. I’ve used iOS SDK before and I’ve experimented on test applications with Android and I’ve always found issues with both the iOS and Android development frameworks. I’ve also looked into cross platform mobile development toolkits such as Appcelerator Titanium and Sencha Touch but I found these were not of me at the time. Any of the aforementioned platforms and frameworks can be used to create a great looking and functional mobile application but I found that they each ask the developer to make a trade off.

With jQuery Mobile, you develop your mobile application with HTML5 and JavaScript/jQuery. With jQuery Mobile, all of your UI is written in pure HTML5 tags with the correct CSS classes and attributes. jQuery Mobile is built on top of jQuery so many web developers can immediately start being productive with jQuery Mobile.

Everybody has an idea for the next great iPhone application. The top reasons I’ve heard from people, including from developers, as an excuse for not getting started is that they don’t have a Apple computer, they don’t want to learn another programming language, they don’t have time, etc. jQuery Mobile invalidates all of these excuses. You can use Firefox or Chrome to test your jQuery Mobile application, you develop using plain HTML5 and JavaScript, and most it’s easy to pick up.

Because a jQuery Mobile application is just a HTML5-based web application, if your an run it on your iPhone or other mobile device using the native web browser. On the iPhone, when you run a jQuery Mobile application the browser will take up a small portion on the screen for the navigation buttons, bookmarks, and other controls of the browser. One way to claim all of the screen real-estate is to create a native application, that is where PhoneGap comes in. PhoneGap is a native shell around a web application, such as those developed in jQuery Mobile. With PhoneGap, you can turn your jQuery Mobile application into a full fledged native application.


Oct 30 2011

Retweet September 2011

From time to time I just blast tweets about software development, project planning, team dynamics, or whatever else comes to mind. Here is a synopsis of recent tweets and rants. If you want to follow the conversation follow me at techknow and/or juixe.

Software Development

  • Code. Money. Respect.
  • Software bugs don’t take anything personally.
  • Code more, sleep less.
  • DONT THREAD ON ME

Thought Leadership

  • Just having a goal is often times more important than the goal itself.
  • Word programming, i.e. writing TPS reports.
  • Code Complete = Tests + Implementation.

Product Placement

  • Google is the casino, or better yet the Goldman Sachs, of online identity, ads, and search. You don’t bet against the house.
  • What is cloud-accelerated web browser? Learning about Amazon Silk, the web browser in Amazon’s Kindle Fire.
  • The project code name for the iPhone’s auto correct is auto cucumber.
  • Spike TV should rename itself to Star Wars TV and the History Channel to Ancient Aliens Channel.

Money Angels

  • Dr Evil is starting a venture fund.
  • If Dr. Evil would have taken his Evil Corp. Public he would have made $1 billion on an IPO. And maybe Google would have bought his company.

Question

  • How many uses can you think of for a paper clip?
  • Where in the food pyramid is candy corn?
  • Is Meg Whitman the new Carol Bartz?
  • Are you changing the world or is the world changing you?
  • What is the person equivalent to having your car lifted up in the air and balancing its tires?

Randumb

  • The Internet made me do it.
  • It’s easy to earn money while you sleep, if you sleep on the job.
  • You are more likely to die due to medical error than a car accident. So if you are in a car accident, don’t go to the hospital, just walk it off.
  • If I could get a nickel every time someone gives me their two cents I would arbitrage people’s opinions.
  • Living the Internet lifestyle.
  • If you don’t want your naked picture hacked from your phone don’t take naked picture of yourself on your phone.
  • There are proposed bills that will make activities such as posting a lip sync video on YouTube a federal crime punishable with jail time.
  • Forget the war on drugs, in the future there will be a war on content.
  • History is not made, it is written, edited, scripted, and appropriated by Hollywood as a blockbuster movie about mutant super heroes.
  • I predict the past.
  • Beauty is in the eye of the beholder, behold yourself.
  • This is not Sparta!
  • Love me, hate me, but you thinking of me.
  • Love it or hate it, take it or leave it.
  • I love love and hate hate.

Overheard

  • OH: When you frown you look like a Klingon.
  • OH: Is everyone in the call on mute?
  • OH: My dress code is to try not to show my butt cheeks.

In Da Future

  • In the future, everyone will be a product guy.
  • In the future, Facebook will be your permanent record.
  • In the future, the revolution will start with a single tweet.
  • In the future, when people say they are going outside the grid, they will mean they aren’t logged into Facebook.
  • In the future, Android developers will need to program using the Android SDK and the phone maker’s proprietary SDK, and the carriers’s SDK.

Million Idea

  • Million Dollar Idea: A treadmill with a weight scale.
  • Million Dollar idea: there is so much artificial flavoring, color, and seasoning in food. Patent dinosaur meat flavoring.
  • Million Dollar Idea: Car alarm system that steams video of the surroundings of your car and scans for perps faces.
  • Million Dollar idea: wasabi guacamole
  • Million Dollar Idea: Carfax for people, including driving record, background check, work history, etc.
  • Million Dollar idea: pepperoni pizza flavored breath mints.

Oct 20 2011

Worst Software Bugs

We all have heard of missiles blowing up in midair because of the wrong unit was used in calculating the trajectory or bank software that misplaced millions of dollars because of a decimal place. It might not compare against blowing up a multi-million dollar missile but here are some of the worst software bugs I’ve seen in projects where I’ve worked.

Shift + O Short Cut – I once worked on a software application where one of the engineers developed a screen search functionality that would find the UI screen by name or feature. Needless to say the modal pop-up dialog for this search feature popped up when the user hit the Shift + O keys. This feature was developed by the engineer on his own initiative, so you can imagine everyone’s surprised when we couldn’t even type a capital o without this thing popping up.

Exposing Regular Expressions – In another project we developed micro expression language which was used and exposed at the application level to users. In one situation, a user reported a error when he wanted to replace a variable place holder with a dollar amount. It seems that when he called the expression language replaceall(“AMOUNT_VALUE”, “$0.00”) the got back the value of AMOUNT_VALUE.00. This problem was caused because we used Java Regular Expressions feature of the String class and $0 expression is a special value in the Java RegEx. This was like a Regular Expression Injection bug.

Localization and Internationalization – In the same project we had a problem with displaying the correct currency symbol used in a financial account statement. There is a big difference between $100 and €100. Account holders are not happy to know that their €100 are now worth $100.

Cut/Copy/Paste Does Not Work – I have seen way too many Java/Swing application where some component does not have proper support for cut, copy, or paste. When you cut from a Java application and paste to say Notepad you get a stringified Java object.

Textarea Size Limit – When filling online forms, the one bug that just kills me is where a textarea has a size limit not shown and you spend time typing a long response which will be either truncated, lost, or rejected on submit.


Oct 19 2011

Fix Common Java Exceptions

ClassCastException – The most common reason for getting a ClassCastException is because the code in question is accessing an object from a List or Map and casting to an particular class, but the List or Map may have different types of classes. If you are not using generics and allow your List to contain any Object, instead of a specific class type, you’ll get a ClassCastException when you force a cast to one type but the object doesn’t descend from that class. A common fix is use Java generics or to check the type of a class before you force the case using the instanceof operator.

InvalidClassVersion – I’ve seen this exception often when working in a client-server environment. This exception is throw when you have two version of the same class in an environment. For example, maybe you made a large change and recompiled a particular class but only updated the server, the client still has a copy of an much older copy of the class. If objects of this class are serialized and shared between the client and the server you’ll an InvalidClassVersion exception. If a server sends a instance of a class to the client, the client who has an older copy of the class, will throw an InvalidClassVersion error because it’s version of the class may not have the newer methods, method signatures, fields, etc. The client version of the class is simply not compatible with the one in the server. To fix this, make sure that same version of any class is always used.

UnsupportedClassVersionError (Unsupported major.minor version 49.0) – This can happen when you compile an application in a higher version of Java then the version of the Java Virtual Machine in which you run the application. For example, if you compile your application for Java 6 but run the application using Java 1.4.2 you will get an UnsupportedClassVersionError.

NoSuchFieldException – A friend from school just sent me a message as to how to fix a NoSuchFieldException. I thought, just double check the library version, that JavaDocs, the source code, and anything else you can to verify that the field does exist in the class. This exception is thrown because he might be using reflection or some dynamic scripting language such as Groovy or JRuby and has misspelled the name of the field he is trying to invoke. The fix is to double check the API.

NoSuchMethodException – This exception is similar to NoSuchFieldException. You’ll see this exception when working with a dynamic language or when using reflection. When you use Java in a dynamic fashion, such as with Groovy or Java reflection, you don’t get the benefits of static compiled language features. You’ll get errors like NoSuchMethodException at run time instead of catching the error at compile time. It is often caused because you mistyped the name of a function that you want to use.

ClassNotFoundException – This exception can happen because you trying to run a class that references another class that is not in the classpath. Check the classpath and make sure that you have the classes and jars you need for you application to run. ClassNotFoundException often happens when you use third party libraries than themselves require other libraries or jars that you are unaware of.

NullPointerException – A typical Java NullPointerExeption is generally easy to fix with a stack trace of the exception. There is only one case where it is difficult to spot the source of a NullPointerException. The only NullPointerException that will have you baffled is those caused by auto-boxing, such as when you auto-box an Integer object to a primitive int variable. If the Integer object is null and you auto-box it to a primitive int when passing the object to a method whose parameter is an int, you’ll get NullPointerException. But if you look at the line where the exception is thrown, you’ll see that it takes an int and int primitives don’t throw exceptions, so you’ll be scratching your head in confusion until you realize that the calling method used an null value Integer object.