2010-10-17

Ruby on Rails and Sencha's ExtJS brings serious productivity to web application development.

As someone who has been living in the Java world when it comes to developing web applications, development times have always been ridiculously long. Cycles spent figuring out what should take hours, not weeks. I recently started playing with two major technologies that really enhance the web sphere. Both of which are squarely aimed at taking application development time, and dropping the curve as sharply as possible.

Ruby on Rails
Ruby is a modern programming language that is about economy of code, and productivity. It is fully featured, and a pleasure to code in due to it's pure object oriented nature. This also contributes to how easy it is to write DSLs in. Ruby could be considered a hybrid between Smalltalk, Lisp and Perl. Due to how many areas it pulls from, the language itself can take a little while to wrap your head around. It's very different than the "big" languages out there (C#, Java, PHP). I plan on writing a much longer post about Ruby specifically, but here are a couple highlights:

Probably the biggest distinguishing factor of Ruby is it's Gems. Perl started going down this route with CPAN, but Ruby took it all the way to its logical conclusion with Ruby Gems. Gems can be libraries, DSLs or executables. It could be something you use in your code, or a command you run to push code to a server. The biggest difference from the 'big' languages out there in this realm is that they can be installed with one simple command on the command link, unlike other library dependency managements systems that require you to either hunt down the dependencies, or download the internet every time you build. For example, pulling in the "rails" framework is as simple as: "gem install rails" and waiting a few minutes.

The other big highlight of Ruby that I'll make is the Rails framework. It's one of the most amazingly productive frameworks for designing your web application, and despite rumors, scales perfectly well. Assuming you know how to write scalable code.There are a ton of great tutorials out there on how to get started with Rails, so I don't ever really plan to cover Rails in any more detail (unless there are specifics I decide are worth covering). Suffice it to say, you could have a running application in about five commands on the command line. Which includes full database backing (with a database of your choice), basic unit tests for generated models and controllers, with proper separation of concerns between layers.

Sencha's ExtJS Framework
ExtJS is a JavaScript framework that makes building fully featured user interfaces in web browsers a fast and nearly painless process. When used creatively, it can make fully customized web applications in much less time than it would take to try and cobble together all the pieces with various javascript libraries, CSS coding and HTML, all in a standards compliant way for all the modern web browsers out there.

There are plenty of tutorials out there for both, so I wont belabor those subjects. But all in all? At this moment in time, I'm thinking that Ruby on Rails partnered with ExtJS is a match made in development heaven.

2010-05-11

On whitespace and other coding "monstrocities"...!

Why exactly is it that programmers all seem to be anal retentive?

Some of the best coders that I have been witness to have been extremely reflexitively irritated by certain things that do not fit their view of 'good coding practices'. Most recently, I was reading archives of coding horror when I came across this post, which can be pretty much summed up as 'OMG WTF dem white spaze not l33T nuff!' While I definitely respect Jeff's work (okay, most of it anyways!), and feel that he's spot on most of the time (really!), I wish that people would stop propogating the misconception that you have to be anal retentive to be a good programmer.

Having worked in mid-to-large sized teams for most of my development career, I can safely say that everyone will run up against different coding practices, and different ways that people believe things should be done. Take this for example:

public String doStuff() {
    return "Because I said so!";
}

Can become..

public String doStuff()
{
    return "Because I said so!";
}

Or..

private String EVERYONE_LOVES_CONSTANTS = "Because I said so!";

public String doStuff() {
    return EVERYONE_LOVES_CONSTANTS;
}

...and there are plenty of other permutations!...

At most shops there is someone that sets standards, and usually gets pretty upset if they aren't followed. Really, it doesn't matter! Honest! They're all usable. All can be self-documenting. Conventions are helpful, but that's all they are. Conventions. If you can't read code you haven't programmed (particularly with use of a decent code auto-formatter), then you have bigger problems to solve! All I have to say is this: If you want my code to have extra CR/LFs, I darn well better have a huge monitor to deal with a heck of a lot of whitespace on my screen at a time.

Yes, most good programmer are pretty OCD about a lot of things. Going 'over the edge' about little things like that only leads down the path of madness, especially if you wander through many different shops in the corporate world.

2010-02-18

Why devices like the iPad are not only relevant, but game changers.

This post is not only relevant to the iPad, but all of the devices that are coming out 'in it's class'. Over the course of speaking to people about the iPad, I have found myself hearing trends. People talking about why they should get an iPad when they already have a computer or a laptop. My answer is very different than some, I still think it's a game changer.

The iPad is an appliance, not a computer.

The face of computing has changed very little since the first desktops and laptops came out. Embedded devices have been used by a select few that were willing to deal with the pains of the little screens, and the poor web browsers. This is all changing. Between the iPhone/iPad OS, and Android, many of those woes are headed towards being a thing of the past. This is a great thing! The day that I can hand my Mom an iPad and tell her to go to town on the internet on there, without worrying about viruses.. well, let's just say that will be a beautiful day. I see that day approaching.

Like all embedded devices, the iPad will be highly software regulated.

Some people think this is tantamount to treason of their beloved computers. I'm here to say it now: Regulation of technology only makes the user experience better! It may not be perfectly what you, geek user, want. But it's going to make the majority of end users much happier in the long run. This is one of Apple's secret to success. This may not be quite as true on Android tablets that are coming out, but it's still useful to have an acceptance process. They have a core of followers, but they've been gaining more as time goes on. Because people are purchasing PCs as if they're well designed systems, when in fact they're just slapped together by the lowest bidder. Sure, Apple doesn't put anything out on-the-cheap. Why? Because you get what you pay for. They spend the extra time designing and developing both the hardware and the software. They integrate and blend the two to provide a world class experience. It's nothing short of the best customer service possible.

Media player

This is the first device that you can viably listen to music, watch videos and read books, on. It's the only class of device that I might actually consider doing all three things on. In those terms, I think that makes it one of the most likely devices to succeed. Do I think it'll immediately be a runaway hit just because of that? No. I do believe that really raises the stakes though. The device can do all those great things that a standard iPod Touch can do, and more.

My workflow will change immensely. At least while I'm at home at will. Instant messenger and web pages on the iPad style device, and I'll only break out the desktop when I have development work to do.

Here's the real game changer: Why have ten embedded device, when one will do?

With the advent of a decent sized embedded device, with this much power, why would a company such as a hospital, bother to have either tiny little devices that connect to stuff? Why not one device that can do it all? Imagine a device that can actually read patient charts, interface with all the tiny little machines, and the like. The iPod Touch was only really good as a point of sales device. This thing could actually be used in places where current embedded technology is old and stale. Completely revitalizing the market in those sectors. A prime example being medical devices, which I happen to think of only because I used to develop for a monotone device that was horrible. It was used to scan stuff for inventory. Imagine walking around with one of these devices in one hand, a scanner in the other. Maybe not completely new, but it would integrate itself easily in to all sorts of workflows. Directly because it is an appliance, not a computer.

The most poor decision that Apple has made regarding this product is, simply put, it's name. It sounds so close to a feminine product that it is unlikely to be taken serious in many circles. My guess? You have a board room of male directors that are brainstorming names, and they decide on the iPad. They approve it, and the first female to see it outside the board room nearly falls off her chair laughing. Unfortunately, the name is already 'set in stone'! Too late!

Ah well. I'll forgive it it's name, and use it as it was intended.

2010-02-03

Mac Unmeasurables

So, a friend of mine asked me to measure "Mac Unmeasurables" recently. For that reason, I decided to go ahead and start this blog post. I'll keep updating it with new ones as I go forward, but this should help some people that are interested in buying a Mac, but don't understand why specs don't match exact specs from laptop to laptop. Keeping in mind I'm forced to use Windows systems every day of my life, because business still hasn't figured it out either. As a side note, I will not be providing apologetics in this post. If you don't realize that Mac Mice have more than one button, go out and look. I'm thinking I'll provide an apologetics post in a few days.

Foundation piece: Apple is a hardware and software manufacturer. They put them together for optimum performance. There is little 'lag' and stuttering in the Mac OS, unlike any other operating system on the market (not counting Chrome OS- It's not really out of beta yet as of this writing, and I can't count that). Apple also understands presentation. Even in the box, they are careful in how they present their products. It's not 'throw it in the box and hope'.

  • 5 minute setup. The most recent Windows systems have started to match this, but you still have to get rid of all the spam-ware that they pre-install on your system.

  • Immediate productivity. Mac finds the network, you enter the password, done. No guess work.

  • Intuitive interface. Most people instinctively grasp the dock in OS X, and the toolbar is always there. The only knock I'll give this part is that when you close the window, you're not closing the program. That's no so intuitive. But it does make it faster to bring that window back, if you have the memory to keep the program running with everything else you're running.

  • Less errors and less 'fiddling' time. Sure, it's not as customizable as a windows box. At least, not exactly the same ways. But, I've never had a Mac crash on me. I know people that have, but I haven't. Further, I demand a lot from a computer. I'm a web designer, and I can have twenty windows open, five-to-ten programs, and a video encoder going at the same time. No problem on a Mac. I avoid that situation like the plague on Windows.
    • Speaking of video encoders. I haven't had a single "free" Windows video encoder work for me without fiddling. Props to Handbrake on the Mac.

  • Closing the lid does what I would expect. It puts the computer to sleep within ten seconds. I've only ever seen one pre-installed Windows sytem do that- An IBM T42.

  • Opening the lid does what I would expect. Windows can't even compete in this arena: My Mac is ready for me to go within probably 2 seconds of opening the lid. Roughly three times since I started using a Mac (years ago), did it take longer than 2-3 seconds.

  • Turning on a bluetooth keyboard that is paired with the computer, whle it is sleeping, turns the computer on. Great for external displays.

  • Simple, stupid backups. Time machine is the first back up technology I would trust my mom with.

  • PDF viewing. Adobe Acrobat Reader? Yeah. It sucks. Everyone knows it, yet they still use it. It amazes me. Preview is much faster at viewing PDFs than Reader. Speaking of which, Mac has a built in preview mechanism for almost every file type. If you're in finder (the equivalent of explorer), looking at your files, just hit spacebar to preview it. Whether it's an image file, video, text, doc, rtf, pdf, it'll show you some basics of what is in there.

  • ...there will be more...


Here are a few points specifically for geeks, because those tend to be it's biggest critics:

  • BSD. Use all your favorite *nix based programs on it. No dual booting, no dealing with all the silly little things you have to in *nix. It's ready to rock and roll. Pull up the terminal, and do all the old familiar tasks you normally can on *nix.

  • Perfect for server connections. Use standard secure shell style protocols. File system paths are familiar. Don't know how something works? Use the man pages.

  • All the networks tools built in to the GUI. Network Utility. Info, netstat, ping, trace, whois, finger, portscan. All baked right in.

  • A usable dashboard. Windows doesn't come with a good dash. They're trying more, but the F12 key drops the dashboard right down over everything and you have access to your time, calendar, notes, all sorts of stuff. Much easier.

  • Need a tool for developing? Admining? It's on Mac. Probably freeware. SQL? Sequel Pro. Developing? Eclipse, IntelliJ, Netbeans. CVS/SVN? Oh yeah.

  • Your favorite browsers are there. Firefox, Chrome, Opera. It's all there.


Here's the trump card: Mac's run Windows! If you really feel it necessary to run a Windows program, you can emulate it on Crossover, or use a virtual environment with VMWare Fusion (Parallels is horrible, I would never recommend it). Mac gives you every environment, and ease of use. No other system can claim that.

Here are a few parting words to think on: Who is the innovator? Where do most new techs come from? The mouse is from Mac. Bluetooth? Mac. CD Drives? Mac. Firewire? Mac. All those pretty programs that showed up in Vista? Yeah. Mac first. It's been called iLife for a long time. No, it's not as open (but there aren't any operating systems outside *nix bases that are). No, it's not as cheap. No, it's not perfect. But am I willing to pay for the experience? For ease of use? Simplicity?

My answer? Yes. Will it always be my answer? Who knows. I use it because it's better. If someone comes along and makes something else better, I'll be there. For now, it's Mac.

2009-12-07

Web Tier Development Patterns

I have been doing web design and development for a few years now. It's been interesting. I have seen a lot of different designs and been part of putting together a good many web applications for different companies. Each of which is done in at least a slightly different way, even if they're using the same technologies. Though I have primarily seen these things done in Java and a few open source technologies, I have an insight to share that seems to be pretty obvious to me, but not so much to others. This, from the perspective of a front end designer, after being part of several great teams.

It seems that the most successful web user interfaces are completely divorced from their back end counterparts. This is somewhat anti-intuitive from traditional web design. In Javaland you have JSPs that are directly included as part of the project. It seems to make sense that they would become integrated with the middle tier because it's so closely linked. It creates a false sense of "togetherness" that really doesn't exist. Static HTML (the way most JSPs are used) and Servlets couldn't be more different if they tried. It's something that has been apparent to me since the first day that I found out JSPs were compiled in to Servlets. I immediately asked "Why? That sounds like a lot of wasted CPU cycles." My comment still holds true today. Sometimes the marriage between JSP and Servlet is useful, where it's going to be a completely dynamic response. However, it's been my experience that using JSPs in a way that utilizes their dynamic nature (and not just for excess complexity purposes), is very rare. Most of the time, even if a few tag libraries are used, ninety percent of the page in question is just static html that has no need to pass through all the extra cycles that JSPs do.

So, am I proposing totally static HTML? Definitely not. There are just too many reasons that the server should do some view logic work. Browsers just aren't built powerfully enough to take care of everything that a modern webpage needs to.

Ideally, I would love to see a "front end project" consisting of a standard *AMP set up. Pick your poison for that P (PHP, Perl, Python.. or Ruby, etc), and a separate Java (or ASP) project for doing the heavy lifting. Compiled code is much more efficient with CPU than interpreted code, and makes a lot more sense to write powerful algorithms in. The interpreted code can easily connect to the compiled code to get the data that it needs on the server side. The static code that the client ends up with is capable of getting access to the back end as well using JavaScript with JSON (or whatever your preferred client side technology stack is) for getting the data from the client side.

I have a feeling this is just one of those separation of concerns design patterns that has not caught on yet. My guess is that at some point in the future we'll start seeing this sort of separation become more common. It adds a bit of complexity in connecting things together, but it relieves front end designers of trying to do a back end designers work. People like me that truly live on the web tier, and not the middle tier, would find great joy in seeing this sort of change in mentality.

*AMP = Fast, immediate delivery of data to the client.
Java/ASP = Powerful, heavy lifter for back end processes.

It only makes sense.

2009-11-20

Google OS Review

So, I got a chance to take a sneak peek at the new Google OS. Or at least, what seems to be the new Google OS.

Not that I'm special in any way: http://discuss.gdgt.com/google/chrome-os/general/download-chrome-os-vmware-image/

However, I just want to throw a few quick thoughts out on the intarwebs.

1) I really like the concept. The computer is part of the network. Your sign in to your computer actually is your Google ID. I like that idea. Problem is? What happens if you're not actually connected? It'd be impossible to use your system. Not that most computer users these days can tell the difference between not having internet and not being able to do anything..

2) It's a good start. Which is exactly where I figure that they are. Starting. Inside of a couple years I am sure that they will have a lot of the bugs smoothed out. But as far as usage as a netbook system? It's just about perfect. Throw that with a 3g card in a netbook, and you've got an "internet based" computer. I never really understood what people saw in netbooks short of being used for that...

3) Not a geek in creation will be happy with it. I can hear the cries already: "I can't install my local server? Worthless!" "It's based on Linux and all you can do is browse the net? Are you kidding me?" Basically, the people who will miss the point of it entirely.

4) It wont be a competitor with Windows. Unless we're going back to dumb thin clients. Which is basically what the OS feels like. Even though it is a fully featured OS, it doesn't have that feel to it, since you are only able to be on the web. I think there is going to be a lot of resistance by the geeks before this ever truly becomes a reality.

That's all I have for now. I think it'll be some time before wide adoption. On anything other than netbooks anyways. I still think virtualization of software is more likely than everything in a browser.

2009-11-18

Apple vs Microsoft - Different market-shares!

I'm really tired of hearing anti-Apple talk from people that don't understand their business model. Microsoft is going after a different demographic than Apple is. Linux is going after yet another. For the sake of this post, I'm going to assume Apple vs Microsoft as the only competitors. Sorry Linux. You're still too geeky.

So, I was hearing things last night like "The video card isn't good enough in the Mac for me to justify it," and "They're just too expensive compared to PCs," nevermind that Mac's are PCs, and "They're too locked down." Basically all of which are statements that are filled with FUD. I wont refute any of these arguments, because they're half truths. Go out and look for yourself if you want to find their answers. Don't believe what you hear.

Lets take the car industry. Most people understand the differences in car manufacturers. Nobody would make the mistake that BMW, Audi or Mercedes are in the same market share as Ford, Chevy or Saturn.

When you buy a BMW, you give up a lot. All your decision decisions are made for you, and it's not extremely customizable unless you're an extremely talented auto mechanic. Even then, I highly doubt there are many mechanics out there that would say they need work. They're manufactured from the ground up to be a solid unit. Everything is taken in to account, and the owners experience is just that much better because every last little detail is scrutinized. It may not have the exact engine you want, or maybe it doesn't have a specific piece of piping in there that you like. It will just feel better. Maybe if you had that Ford, you could throw that single piece in there that you want, and you would feel happier about your purchase and yourself because you made a contribution to it.. That's just not how it works with the higher end cars. The experience is what you pay for, not the specific little pieces. That isn't to say you can't pay attention to the specifics, you just can't weigh them on the same scale as their lower end competitors. Sure, a truck has a bigger engine and more power than a little BMW car. Can it go as fast? Does it look as good? Will you be as happy? Will it fall apart as much? Just because you think it costs too much, or you can't afford it... That's not a good enough reason to look down on it.

That's the difference between a Mac Box and a Windows Box. Experience. I have (and do) own both. I use them for their respective strengths.

I play games on my Windows box, and I do everything else on my Mac. I've repeatedly tried to go back to Windows for many of the things I do on the Mac, and simply put, it just doesn't feel as fun. What would take five keystrokes on a mac system, takes ten on a windows system. Windows is good for certain activities, Macs are good for another set of activities. Right tool for the right job.

Optimistically, I'll hope that some day people are going to stop spreading FUD. I'll look forward to that day.