Apr 17 2011

Dive Centers, iPhone apps and More

For those of you who follow, you always want to know what I’m up to.

Some might think I’ve spent all this time opening a dive center here in the New River Valley. In fact, I think I’ve only spent about 10% of my time doing that.

iPhone Apps

We have two that are completed and awaiting final testing. This is usually the longest part of creating any application. We haven’t had any of our live apps crash yet, and I prefer to keep it that way. So, we do a lot of testing. And when we think we’re done, we test some more.

Lab Work

One must think I’m getting my PhD in Environmental Engineering. I do have a degree from the College of Engineering (Computer Science), but Environmental? I would never have thought. But Ana is finishing up and I’m helping out. That means preparing batch reactors, measuring gas production and writing a thesis. Luckily I’m only helping in small quantities and the lab work is completely done. Now it’s just data analysis and finishing off that thesis. I guess it’s science, and we use a computer, so it’s kind of what I went to school for.

Businesses

As I mentioned, we opened a dive center in Blacksburg. But we also created a state of the art website for it that’ll allow the company to grow into something much more than a dive center. We had the awesome team from HellowYellow design us the site, and they did an amazing job. We’re working on a ton of new features to the site like class registration, videos, etc. How hard can all that be? Well it’s part of a much larger picture, so a little harder than you think.

Part of that larger picture is this: It’s not about opening a dive center and sharing our passion for scuba. It’s about taking a business, any business, and making it the best at what it does. Most dive center websites look like theirs were created in 1996, by a dude with 10 minutes of html experience while sitting on a beach, drinking coronas.

So we started something. That something has grown to include several businesses, several partnerships, several clients and a lot of change. That change will upset a lot of people, namely those on the other side. How many, will be our measure of success.


Feb 22 2011

Mobile Application Development

I’ve been doing a ton of application development for LTZ lately. Not only have I been working hard at getting iPhone and Android apps finished, but I’ve also been updating the website and making sure our apps are properly represented. Take a look at the website to see the changes that have been made!


Dec 6 2010

iOS Development Code Kitchen

I’ll be putting on a workshop on iOS and iPhone development this Saturday from 9AM to 5PM on the Virginia Tech campus. The event is free so if you’re in the area feel free to sign up:

http://www.ltzllc.com/2010/11/ios-development-code-kitchen/

The event will run all day and will be hands-on programming, but all levels of experience are welcome and encouraged to come.


Oct 7 2010

I Am Not an Entrepreneur

Many people throw around the term entrepreneur. It seems most people put that in their bios. Don’t tell me you’re an entrepreneur, show me. What have you done?

When we started LTZ, our mobile and web app development company, we didn’t need any venture capital funding. We didn’t need a fancy office to rent. We didn’t need to do the whole fancy company launch. We just sat down at our computers and started coding. And when we finally had a product to ship, we did all the legal paper work and got ourselves a little LLC.

Sure there were risks. The risk of becoming single again was always there. Sure there were long days. 16 hours seemed to be the norm. And sure there were a few new technologies that we created. But when it came down to it, we just had a simple plan: work really hard and make some great products.

The business model we had, seemed like a great idea: become an authority and gateway for indie developers to develop their apps with. Sort of like a record label for mobile app developers, but without the whole ripping them off bit. We’d mentor and direct them to a finished product and take a minimal cut from the net profits. Any programmer can attest to the numerous projects that never make it to a finished, polished, tested app. But that’s exactly what separates the professionals from the amateurs: finished products.

Now, we’re looking at things differently and adjusting our model. We’ve found out a little more about what works and what doesn’t in this new space. When you’re such a small company, the saying, “If you want things done right, you gotta do it yourself,” turns into, “If you want something done, you gotta do it yourself.” It’s really hard to concentrate on writing good code when you’re the tester, the project manager and the client manager all in one.

I’ll talk more about the new direction we’re heading soon. In the meantime, we’re still working on the details and we’ll update everyone as soon as we finalize everything.

I am not an entrepreneur. I just create stuff.


Jul 1 2010

Naming Conventions – Why Your Code Sucks

I’ve seen a lot of poorly written and ugly looking code in my time. That’s not even considering the undocumented and uncommented code. We all know we should comment our code but how many of us do it consistently? I admit, when I’m in a coding frenzy, stopping to write comments just gets in the way of my thought process and can be distracting. I will however write a bunch of comments before I write the code, of the operations I think I need, in order to give me an outline of where I need to get to. For example:

// Get URL string for video file
// Load video file from URL request
// Load video file into video player
// Set up video player
// Play video

I may not know all the APIs to load and play the video just yet, but at least I’ve given myself an outline and as I fill in the code below each comment, I can see exactly what I’m doing and where I need to go.

Why Your Code Sucks

The point of this article is not to talk about comments, but how to avoid writing them in the first place within your functions and still be clear for everyone else, for the most part. This is your code:

newPlPt = crt2pl( nmc.x, nmc.y );

Not even a comment could concisely convey the meaning of that hideous statement. Instead, why not:

newPolarPoint = cartesianToPolar( newMediaContext.x, newMediaContext.y );

Well written code is self documenting. Let me restate that: if you can write code so that someone can jump to any point of that code and understand what’s going on at that point, read it like a sentence, and not have to decipher minute details like what each variable means, then you don’t have to comment most of your code.

There’s no reason you need to shorten the names in your code. Most programmers have never had file size limitations to deal with, so there’s no reason for it. Stop pretending you live in the 1960s and embrace nearly infinite file storage. To save keystrokes perhaps? Please, use a real IDE with code completion and stop doing stupid things like:

public function updateP( p:Player, d:MovieClip, b:MovieClip, t:Textfield);

Function Names

Also, because your functions are essentially actions, they need to reflect that in the name, so put a verb in the beginning of your function such as: getData(), setStatus(), enableWiFi(), hideControls(), handleGraphicException(), launchBall(), etc.

Class Variables

Get rid of the underscores in front of your class variables. For example: _dg; _myNumber;. All class variables should be private anyway, so why do you need that ridiculous convention? It’s a hold over from C where there was no “private” keyword, so you’re using it and you have no idea why.

Also, what’s with the “my” naming convention? You sound stupid when you have those: myInstanceName, myMovieClip, myGraphicsContext. Of course it’s yours, whose would it be, if not yours? If you’re programming with a colleague, do you refer to his variable references as yourInstanceName? Or hisVideoFileURL? Of course not. Don’t be that stupid; you’re reading too many stupid online tutorials by uncreative people who only code because they have nothing else better to do while living in their parent’s basement.

In the very least, be consistent with your naming conventions.

Hungarian vs. Polish notation

Depending on which language you’re coding in,  you may need to use a notation to help you with type casting. Let me rephrase that: if you’re using a loosely typed language, use Hungarian notation. You should probably use this with strongly typed languages anyway because with abstract types, you never know what you could get into and it’s just generally less confusing.

Hungarian Notation: vendorNameTextField or vendorName_txt

Polish Notation: txtVendorName or textFieldVendorName

Why not Polish notation? Not only is it ugly, but why would I sort on variable type instead of the variable name like I can do in Hungarian notation? The notation names come from how the speakers of those languages modify their verbs and nouns. To say: “My ball” in Hungarian is:  ”labdám” where “labda” is the root word and the ‘m’ singifies a first person possessive. Hence the ending of the word shows the crucial information. It’s the opposite in Polish notation where the beginning of the word is modified. In the interest of full disclosure, I love the Polish, but I am Hungarian, but I promise that’s not why I prefer one over the other.

Final Thoughts

In the end, be consistent, be clear and spell out your variable and function names.