Apr 12 2010

Working Code is Just One Corner Case

A use case is just one corner case, and developers working with code very often test just for that one corner case. A corner case can be described as a program error or software bug that occurs outside of normal use, or caused by parameter values and environments outside the intended acceptable range. I’ve learned that corner cases are more common than what developers like to admit, so much so that working code is just another corner case.

In my experience, the number one source of corner cases are assumptions hard code and baked into the source code, like assuming that your users have five digit zip codes, or use an English alphabet, or are based in a specific timezone, etc. Sometimes corner cases arise because someone cut a corner, didn’t check if an input parameter fit a certain criteria, was of a specific format, length, or within an acceptable range. Yet with all the assumptions we inadvertently leave behind in our code, I’ve seen developers take great offense and defend their code with the fervor of a religious zealot by saying, “you are not supposed to enter non-numeric values.” Even with the most stringent process and under tight deadlines, developers have been known to regress to the “if it compiles, ship it” mentality. You can cut corners in the design and implementation of a software program, but you most often will not cut the corner cases where bugs like to linger, hide, and build nests out of code. The number of corner cases is proportional to the complexity of an application.


Apr 6 2010

Retweet March 2010

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 and I’ll be sure to follow back.

Software Development

  • Security pet peeves: captchas, security questions, having to login after changing my password.
  • A supercomputer won’t solve the incompetence of bad programmers on a deadline.
  • All software is in beta.
  • The Like button needs to be killed.
  • \-: “premature optimization is root all of evil.” (-: “That’s what she said.”
  • This must be a record. I just improved our app’s memory consumption by 80%, some 400MB, by changing one line of code.
  • I love technology because I can now blame my misspelling on my iPhone.
  • Where 2.0 is the new meme. Is your website Where 2.0 aware?
  • Building a community and building a business around a community are not the same thing.
  • The linked list was recently patented, I’m going to patent something critical to civilization, like calculus or pottery.
  • Dear debugger, I wish you could introspect my feelings and put a breakpoint on my heart break.
  • A slew of computer bugs are caused by assumptions made by the programmer.
  • You know things are bad when you get error code 0000.
  • Bugs grow organically.
  • It is possible to make spaghetti code out of Obeject Oriented Programmmmmming?
  • Rule of thumb: use immutable objects as keys to hash maps otherwise get to you your debugger.

Team Leadership

  • The best ideas are free.
  • No matter what, you will never be less busy.
  • Let’s be honest, anywhere from 10-30% of a resume is a stretch.
  • So as not to forget anything, remember nothing.
  • When you give someone else time, you waste you own.
  • Don’t give any answer, give the right question.
  • If you have a one trick pony, ride it until it is ready to be put to pasture.
  • Problems are meant to be solved only if they can’t be ignored.
  • The one best possible thing you can do to make any situation better is to not make it worse.
  • One can lead by asking questions, just as well as giving orders.
  • If you build it, they will come. But if you make it to complex or change it to often, then they will leave.
  • The secret ingredient is to believe there is a secret ingredient.
  • I don’t express myself best when speaking, but when reflecting.
  • Praying may not change the world, but it can change your perspective which is helpful to change your world.
  • Folks usually want the what first but I think that the why and the how is more important than the what.

Product Placement

  • Facebook announced a major investment by the CIA. It was reported that the US Gov will push for Facebook Connect as a National ID program.
  • PayPal just sucks. I can transfer money to former Soviet Bloc countries faster than I can between PayPal and my bank.
  • Spam is like a staple in Hawaii. So it comes as no surprise that Mahalo is one of the most spam ridden sites online.
  • My suggestion to cable companies: give away basic cable to every American with on demand features. Add value outside the cable box.
  • Which will provide better value/info for businesses, yelp or foursquare?
  • The current Apple Appstore approval time is rand() * Months.
  • McDs should make a tofu McMuffin.
  • A sign at a Palo Alto church: redeem your soul, there is an app for that.
  • Purple Cow Thinking: don’t be boring, safe is risky, design rules now, very good is bad.

Quote

  • If there is a limit, you should, you must test it. – Seth Godin/Purple Cow
  • Vision without execution is hallucination – Thomas Edison
  • Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful. – Herman Cain

Apr 5 2010

Apple iPad Top Resources

The iPad has garnered the most press I have seen for a electronic device since, well, the iPhone. Just after a day after it’s release, it has already been jail broken. Here is a list of my favorite iPad reviews, resources, articles with tips and tricks, etc. I hope you are reading this in your new iPad!!!


Mar 14 2010

Zombie Code

In this conversation tweet snippet I rant about dead code when someone noted that in a Murphy’s Law sort of way, you don’t need dead code until you delete it. Thank goodness for version control systems.

Zombie Code

  • @techknow: It is a dead end maintaining dead code, unused, and unreachable code.
  • @archiloque There is something schrödingerian about dead code: it is often unreachable *until* you remove it.
  • @techknow: LOL my question is, if you have dead code in a live site is that considered zombie code or sleeper cell code?

Here I question how evil Google really is when a friend warns me that whatever you say about Google may be used against you by going viral. Google is big brother and it’s CEO thinks we can place our trust in it before our governments. I can’t wait until Google hires Hilary Clinton as the Senior Vice President of the Division of State at Google.

Indexable

  • @techknow Google, if you are not evil why you have to make that your motto? Who are you trying to convince?
  • @vladgur: Don’t hate Google on an indexable medium.
  • @techknow: Good advice, Google’s cache does not forget.

Spaghetti Code is when the code is so convoluted that it’s code path resembles a plate of entangled spaghetti. Here I rant about working with code base that smells like a bad plate of spaghetti.

Code for Dinner

  • @techknow: It is possible to make Spaghetti Code out of Obeject Oriented Programmmmmming. Om nom nom.
  • @mcory1: Possible? Heck, its pretty easy sometimes, even if you know what you’re doing ;)
  • @techknow: I’m working on some code that looks like a cross between Spaghetti Code and Lasagna Code. I need a bottle of wine to digest/debug this.

Chat Roulette is one of those ideas that are so simple that they are genius. Here a friend and I compare and contrast between Chat Roulette and the MTV television show Jersey shore.

Jersey Roulette

  • @techknow: MTV or VH1 should do a reality show based on chat roulette.
  • @jzy: It’s called Jersey Shore.
  • @techknow: LOL from what I have seen of Jersey Shore, I would think they used chat roulette to cast the show.
  • @jzy: I was just joking of course, no offense to Chatroulette.
  • @techknow: All kidding aside, I think chat roulette is a great idea. It reminds me of the early days of Twitter, I wish they had an open API.

Mar 8 2010

Facebook, Zuckerberg, and Plain Text Passwords

Speaking about the public allegations that Mark Zuckerberg, alleged founder of Facebook, hacked into Harvard school email accounts of rivals and school journalists Kevin Rose said that the allegations don’t even sound technically possible. The way the allegations are described, Mark Zuckerberg used the passwords of Facebook users he wanted to track on other systems. Since many online users tend to have one or two different username and/or passwords, if you have the password for on online service you might guess a the login password to another service for that same user. Clear text passwords are a real security concern. On This Week in Tech # 238, Kevin said, “I doesn’t make sense, I don’t see it happening. … Nobody really stores passwords in plain text anymore, I can’t imagine Facebook would have done that.” I’m a fan of Kevin’s Diggnation podcast but I have to call him on this social media bullshit on technical grounds. It might be that his social graph is clouding his judgment. The sad truth is that even today, some large companies have be called out for storing passwords in clear text. In fact, a long time sponsor of Diggnation, Go Daddy was recently accused of storing passwords in plain, clear, simple to read text. Surely, he must have known or heard of the Go Daddy privacy mishap. His explanation that no one really uses clear text passwords anymore is very naive, it sounds like the advice given in the many tech conferences that Kevin is known to attend. I very much doubt that some “copy and paste” programmer in some college dorm room in 2004 would develop a website with 2010 best practices and user experience.

I would hope that Facebook does not employ practices such as these now, but I sure don’t trust them with my account and do the bare minimum on Facebook that is required to keep up with friends. An anonymous Facebook developer in an interview stated that any Facebook developer can impersonate any user and all data is unencrypted so any developer can possible run SQL queries to look up your data.

You have to think about it, for a social networking site, why can’t you befriend it’s founder, Mark Zuckerberg, like in other sites. I mean, Tom is in my top eight on MySpace. Don’t trust the 800 pound gorilla as far as you can trow it especially if it is riding the elephant in the room.


Mar 6 2010

Retweet February 2010

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 and I’ll be sure to follow back.

Software Development

  • Androids dream of electric sheep and I of bytecodes.
  • A large number of performance issues can be tracked to overuse of for loop, sequential search.
  • I hate it when a fatal critical defect gets assigned to me after 5:30PM. I think QA does this on purpose, some sort of revenge.
  • Carpenters’ rule: measure twice, cut once. Programmers’ rule: design twice, code once, refactor as many times as necessary.
  • You can’t do real-time software engineering where you fix bugs as they are discovered.
  • Compilation cycle costs productivity.
  • It is unbelievable the amount of work, time, and meetings are dedicated to features that are useless in the field and limit usage.
  • SEO Secret Sauce: Always be writing good content.
  • I consider an interview good where the interviewee talks more than the interviewer, and where the answers are more profound than the questions.

Team Leadership

  • To be a leader be easy to follow.
  • Inspiration has no expiration.
  • The recipe to success is that when you are missing one ingredient in that recipe, you don’t quit. Improvise and make the dish your own.
  • Waiting until the last possible moment is not a plan.
  • Strategy, execution, luck. Pick any two.
  • Profits, Passion, Purpose. Pick any two.
  • Imagination is a renewable resource.
  • New Motto: Heads Down, Focus Up!
  • Doing a thing does not preclude you know what you are doing.
  • When things get tough, get smarter then tougher.
  • The worst thing you can be on a team is being inconsistent.
  • Right understanding, with right effort, on the right direction, at the right time makes for the maximum results with the least effort.
  • Build up your immunity to failure, just like you build up your immunity to the cold flu.
  • If you can find joy in a dilapidated studio you will find joy in a palace.
  • If you are still trying you haven’t failed yet.
  • The only response to fear is no fear.
  • If you love what you are doing, you are successful.
  • If you believe you can’t, most likely you won’t. If you believe you can, you might.

Product Placement

  • Is Google working on a GPad based on Android?
  • Google, if you are not evil why you have to make that your motto? Who are you trying to convince?
  • A more appropriate name for Chipotle Mexican Grill is Burrito Factory, since is not Mexican or a Grill or have chipotle salsa.
  • Will the iPad make a better kindle reader than the Kindle?
  • The iPad will be the Gitmo of gadgets.
  • Why is Tumblr so slow? Is Tumblr the Goecities of our generation?
  • The should have American Idol for bad comedy and acting… Oh they already have it, it’s called Saturday Night Live.
  • It used to be that people stop and smell the flowers, now if at all, people stop, take a picture, and post it on Facebook.

Question

  • Was the crotch bomber a false flag?
  • Is the US a mute-cultural smorgasbord or a assimilating melting pot?
  • Is life an individual sport or a team sport?
  • Why would a fully charged cell phone that was turned off for a week have it’s battery drained?
  • What does SEO stand for? Spam Engine Optimization?
  • If love is supposed to be patient why do people rush into love?
  • Is life a journey, adventure, game or scoreboard?
  • Are you a samurai or rice farmer?
  • Is God from outer space or from inner space?
  • What is the secret sauce to your success?
  • which is your favorite bear: yogi bear or pooh bear?
  • If everyone cheats is it still cheating?
  • If everyone cheats are you cheating yourself if you don’t?
  • Does God have Buddha nature?
  • How much Buddha nature does the Buddha have?
  • Which is more satisfying, physical joy or spiritual joy?
  • Is there duct tape for the heart or super glue for the soul?
  • Do you think dogs suffer from autism?