Apps For Income Program For the Unemployed

Times are tough for those that don’t have a job. There just aren’t many opportunities out there for a lot of folks.  According to Tech Net, application software development has created 466,000 jobs in the United States since 2007.

Real Software announced an interesting program called the Apps for Income Program that will give away 20,000 licenses of Real Studio to anyone that is unemployed. The only requirement is proof of unemployment from the state you live in.

If you get accepted into the program you get a Personal Edition license for Real Studio and that’s enough to get you started. Real Studio is a software development environment that lets you create desktop applications for Mac, Windows, and Linux using one code base (Note: Personal Edition will only let you compile for the operating system the IDE is running in).

Software development isn’t simple and it isn’t something you learn overnight if you don’t have any experience. It takes some hard work and dedication to learn how to create high quality applications. The documentation and example programs that come with Real Studio are good for a vast majority of new users and there are a number of resources out there to help you learn Real Studio. Some people learn differently, however, and there are resources available to those too.

BKeeney Software Inc. has been Real Studio consultants and trainers for the over a decade creating internal and commercial applications for clients all over the world and of all sizes. Real Studio creates native applications suitable for Fortune 100 clients, the business next door, and for resale everywhere including the Mac App Store.  We offer onsite training on how to get going with Real Studio.

We also offer over 36 hours of Real Studio training videos to subscribers via video streaming from our website. These videos allow the user to see how someone with over a decade of Real Studio experience creates and debugs applications from the ground up. In addition to the video, most sessions have a project file complete with source code that they can use in their own applications.

The training area is written entirely in Real Studio’s Web Edition that makes web applications that can be served from Mac, Windows, and Linux computers. The Web Edition training web app has served up thousands of minutes of video since it went live in the Fall of 2011.

You can find more information about the BKeeney Software Real Studio training program at http://www.bkeeney.com/realbasic-training-section

You can find more information about the Apps for Income program at http://realsoftware.com/company/news/2012/appsforincome.php

Dear Idiotic Developer

Dear Idiotic Developer:

OPC is our internal slang for Other Peoples Code.  I’ve talked about this before but just in case you’ve never been here before, OPC projects are always the most dangerous kind of projects to work on.  They can quickly become a rats nest and cause no end of grief mainly because you have to figure out what the original programmer (or programmers) was thinking.  Because it’s a Friday afternoon and I’ve been up to my elbows in digging through your OPC project all week here is my list of complaints:

  • Poor variable names:  Variables such at ‘tmpd’ and ”bDbDl” don’t tell me anything.  Long variable names aren’t going to kill you and using Real Studio’s autocomplete will (usually) make this a non-issue.
  • Three Letter Acronym (TLA) Variable names:  Stop being lazy and use some real words.  Obviously you didn’t expect someone else to read your code in five years.  If I ever find you I promise I will mock you.  I hope you are doing a better job of naming variables in your new job than your last one!
  • Poor method names:  Methods named “SelAcc” and “DoWork” don’t give me any type of clue on what it does – especially when you have no comments in your code.
  • Nested If-Then Blocks from Death:  There are times you need to do this but it’s been my experience if you’ve got more than 2 or 3 at any given time your method is too long and should be broken up into smaller methods.  Keep it simple.  Complexity kills.
  • Multiple nested loops from death:  See nested if-then blocks from death above.
  • Long methods:  This kinds of goes with the previous two.  If your methods scroll and scroll and scroll you have a problem.  If you had a problem in that method (i.e. it throws an exception) good luck finding the problem.  Break it up into smaller chunks of code.  Perhaps you can take the 100 lines of code you have the first part of your IF statement and break that out?  Just sayin’.
  • Controls using the default names:  Really, you expect me to figure out the difference between TextField1 and TextField11 by making me look at the UI?  Next time, please use a name that will mean something to you in code.
  • Controls using generic names:  On the flip side you used a name different than the default one.  Good for you.  Perhaps next time you can use something other than ‘s’ for its name because it took me a while to figure out it was damn text field rather than just a plain string.
  • Constant names versus property names:  Quite ingenious the way you used the same constant name as a property name so that the IDE doesn’t help me in autocomplete.  Thanks.  That’s ones special.
  • Stop trying to be fancy:  I get it.  You went to whiz bang college and learned some cool programming tricks and techniques and you’re pretty smart.  Remember, you’re writing for your boss/client/person who signs your paycheck so don’t forget that you’ll eventually move on/get fired/hit by a bus.  Be nice to the poor bastard that has to learn your code after you.  Assume they do not have your skill set.
  • No comments/documentation.  Of course given all the previous bullet points this one isn’t surprising.  Would it have killed you to put a sentence – ONE SINGLE &*^!@% SENTENCE – describing what a method does?  If you hadn’t done all of the above items too that’s all it would have taken but instead you have ZERO comments in 10,000+ lines of code.

But, I must say thanks for reminding me why I don’t like working on OPC projects.  You’ve taught me that just saying “no” in future projects will make my life easier and less complicated.  My wife, kids, and dog will like me better if I don’t take another OPC project.

I think if I had any advice for programmers just starting out.  Spend six months fixing Other Peoples Code (OPC) and see what drives you absolutely bonkers.  Then, and only then, can you start writing your own code.  You’ll hate it but it will give you some very valuable experience early in your career, on the things not to do.  Being kind to the developers that come after you is just as important and by doing this you’ll know.

Ultimately I’m a lazy programmer.  Not that I don’t do the work I just don’t want to work that hard at figuring out old code.  If you name your variables and methods properly and consistently, keep your methods short, and if you write minimal comments it’s not that hard to figure it all out later.  Having to guess at someone else intent makes my head hurt.

Sincerely,

Bob

So dear readers what OPC foibles drive you crazy?

Busy Month

I haven’t been posting much this month for a reason.  This is, in all seriousness, the busiest January we’ve ever had for Real Studio consulting (and we’ve been doing this for over ten years!).  All three of our full-time Real Studio developers are maxed out on projects and not just on single large projects either.  We all have multiple projects awaiting our attention as soon as we have the time.

Being that busy is always a good thing-bad thing proposition.  My backlog of Real Studio training videos just gets bigger by the day.  Oh well, they’ll wait until I’m slow or want to do something completely different for a few days.

I’ll admit that I have been very critical of Web Edition – especially when it first came out.  I felt that it was released too soon with obvious bugs and holes in the frameworks, wasn’t adequate testing, and was without features that were necessary.  A lot of that has changed recently (though WebMoviePlayer still burns a hole in my stomach) and we’ve found that most projects these days have some sort of web component in them.  Web Edition fills that need for us and while it may not be the best, fastest, scalable, or comprehensive web platform to deal with it has increasingly become a part of our standard package.

I mention this because all three of our developers are working on projects where Web Edition is used to some extent in conjunction with the desktop apps.  I think it safe to say that about 1/4 of all our Real Studio work is using Web Edition.  Not bad considering it wasn’t really usable until mid-Summer 2011.

Web Edition is much like Real Studio desktop apps.  You have limited options and there are a bunch of compromises that you might not be able to live with.  If you can live with the compromises, development is very fast.  While deployment can be kind of a pain it seems that most of them revolve around three or four issues (FTP transfer, file permissions, 32 bit compatibility libraries, and the .htaccess file).  The fact that you can reuse much of your code between desktop and Web Edition is icing on the cake.

Anyway, that’s what’s up with us.  How is 2012 starting for you?

Crazy Month

It’s been a while since I’ve posted something.  There’s a reason for that.  First, business is good and all of our developers are busy and will be busy for the winter.  That’s an awesome thing!

My Nigeria trip at the end of September really put some work on hold until I got back.  Thankfully I have some really cool (and patient) clients that are flexible in their schedule and were accommodating to the change in schedule due to travel and as a couple of emergency projects showed up.

Then we sold our house that had been on the market since June.  Then we bought a house (24 hours later).  And then moved out (and in to the new house) less than 2 and a half weeks later.  Even our Real Estate agent (who does 120 homes a year) says that this sequence is fast, fast, fast!  The one positive note is that the movers complimented us by saying we were “really organized” and I’d say so as in less than 48 hours we are about 85% unpacked.

Prospective clients keep showing up and asking for quotes.  There are a LOT of people asking for quotes from us to take their VB6 applications and rewrite them into Real Studio.  Most are scared away by the price (because there are no conversion tools so it’s really a rewrite) but a few have been serious enough to continue the conversation.

It really is a good time to be a Real Studio developer.  Every developer I know is busy and that’s a really good thing.  If you are not part of the Real Software Developer Referral Program you should be as it’s a great way to get leads.  One project and it pays for itself.

I barely have things unpacked from the house move and I’m off to the Real Studio Database Days training in Frankfurt, Germany where I’ll do a short presentation on our ActiveRecord implementation.  I must be crazy.

See You in Frankfurt

Join me at the Real Studio Database Days training in Frankfurt, Germany on November 3rd and 4th.  I am looking forward to talking to the group.  Speakers include:

  • Stéphane Pinel from Real Software
  • Geoff Perlman from Real Software (via video chat)
  • Jens Boschulte from DynaForms GmbH
  • Simon Larkin from QiSQL
  • Thomas Tempelmann
  • Christian Schmitz from Monkeybread Software
I love going to developer conferences.  I get to meet people that are passionate about Real Studio and those that are just learning about it.  What’s best, though, is the cool stuff I learn from those that haven’t spent ten years working with it like I have.
In my recent trip to Nigeria, someone totally new to Real Studio taught me a new technique with web apps.  I can’t wait to try it out on a project.  So you never know what you’ll learn!  See you there!

Visual Basic 6 TIOBE Index

The TIOBE index for programming languages is an interesting visual perspective on programming languages.  Take a look at the graph for the trend of Visual Basic since 2002.

Visual Basic seems to have taken a big hit at the end of 2004.  I’m not entirely sure of why this happened because .NET had been released in February of 2002 in Visual Studio.  Visual Studio 2003 was released in April of 2003 and the next update was Visual Studio 2005 which was released in November of 2005.  Vista was released in January of 2007 so I don’t believe it has anything to do with the operating system either.

Perhaps what’s interesting is that it nearly regains its former popularity in about two years.  Could this have been a reaction that people found .NET to not be as easy to use as VB6?  I know that some people were dismayed that VB.NET wasn’t much like VB6 and abandoned it – especially since Microsoft operating systems weren’t breaking their old VB6 apps.

Since the midway point of 2009 it seems like the bottom has dropped out in VB6 popularity.  Could it be because Microsoft officially ended support for VB6?  Again, speculation on my part, but that is about the time that I started seeing an influx of requests for quotes from people wanting to convert their VB6 apps to Real Studio.

Another huge drop happened in early 2011.  Was this due to the confusion of whether or not Windows 8 will support VB6 applications?  Perhaps.  I have seen another increase, in the same timeframe, of people looking to convert from Visual Basic to Real Studio.

Is Real Studio (i.e. REALbasic) the right choice for your Visual Basic 6 application?  The answer is a qualified maybe.  If you want one code base that works the same on Macintosh OS X, Windows, and Linux and perhaps a similar code base for a web app (Web Edition has separate UI classes than the desktop) then Real Studio might be a good fit.

If you’re looking at converting to Real Studio please do your homework.  Learn a little bit about the language (<shameless plug>Like my training videos<\shameless plug>) and work with it a bit.  Do NOT depend upon any VB6 to RB converters working – there are simply too many things that REALbasic is better at.  You’re better off rewriting your app to take advantage of moderns things like subclassed controls and threading rather than try to force a Real Studio app to behave like a VB6 app.

My final bit of advice is to forget about your ActiveX controls you’ve spent so much money on.  They probably won’t work and they won’t work on the Mac or Linux anyway.  Find and switch to an equivalent, if possible, but you’ll probably create some of your own subclassed controls.  In the long run you need to think in RB-speak rather than VB6-speak.

Real Studio, in the long run, is pretty inexpensive compared to Visual Studio, in my opinion.  I know people that thought of nothing of dropping over $1000 per year per developer on control suites.  Real Studio is much cheaper from that perspective since subclassing controls, canvas controls, and container controls eliminate the need for much of those expensive suites.  The drawback is that you end up doing the work yourself rather than some other developer.  And some things just can’t be done in RB that you might have come to expect in VB6 (like specialized controls in a grid cell) simply because on the Mac or Linux there is no equivalent.

If you want to convert your VB6 app to Real Studio, you can take a look at our conversion page at http://www.bkeeney.com/consulting/vb2rbconversion

Developer Referral Program

We’ve been Real Studio consultants for ten years now.  We also belong to the Real Studio Developer Referral Program.  We get a fair amount of consulting business from the referrals.  It’s probably safe to say that over 50% of our business is a direct result of the Referral Program.

We answer most posts that potential clients add at the Find a Developer Page and while we don’t get an answer from everyone we do talk to quite a few.  What amazes me is how few developers are responding to referrals.  A potential client told me today:

You were the first (and so far, the only) to reply.

This was a fairly straightforward project that was for a cross-platform app.  The client even knows what technologies they want to use.  How hard can that be?

The Developer Referral Program cost $495 for 12 months and $295 for 6 months.  This isn’t a lot of money (it used to be a lot more when it was bundled with priority support plans) and it can easily be made back on a single project.  If you’re looking for Real Studio development work, this is a good way to get into it.

What’s great about the Referral Program is that the people asking for developers already believe they need Real Studio.  There’s no selling them on the benefits of Real Studio – they’ve already decided on it!  Talk about shooting fish in a barrel.

Anyway, I just thought I’d share this with you.  Every Real Studio consultant I know (and I know more than a few) is busy.  There is enough work for more Real Studio consultants.

The Plugins/Libraries We Use

We do a lot of projects every year.  Every project is different but we have a core set of third party controls and plugins we use on a regular basis.  Here’s our list.

Monkeybread Software  http://www.monkeybreadsoftware.de/realbasic/

I know a lot of people complain about the Monkeybread plugins but we find them to be most useful.  Time is money and chances are good that if there’s a system declare you might need they’ve already done it.  Plus, they are very responsive to bugs and changes to Real Studio.  They’ve been very proactive in developing Cocoa compatible plugins.

The Chart Director plugin is a wonderful charting tool.  It has a ton of features and is very fast.  We’ve used it on a number of projects now and we’ve been very happy with it.

Automatic Updater Kit:  This set of classes and utilities is must have for Mac and Windows apps.  On Mac OS X it uses Sparkle to do automatic app updates and on Windows you can set it to use an installer file.  We’ve automated this (using IDE scripts) to the point where we only need to run one command line function to finish everything (and that only because we haven’t automated the Inno Setup process yet).  We recently modified the code to do some data file updating as well.

Einhugur  http://www.einhugur.com/index.html

We use much of this suite as well.  Real Studio does not ship with Date and Time or Calendar controls.  The Einhugur set comes with nice versions of those as well as a wicked fast TreeView and StyleGrid controls.  They have a number of other libraries and controls that are very useful including their E-CryptIt plugin that offers many encryption, encoding and hashing techniques.  Einhugur has also been very proactive in developing Cocoa compatible plugins.

Formatted Text Control  http://www.truenorthsoftware.com/formattedtextcontrol/

If your app needs true RTF file support or need inline graphics then this is a must have tool for you.  This is a set of pure RB classes (unencrypted) so you can dig into the guts and make your own modifications (or fix a bug or two as we’ve done over the years).  This is good code to learn from as well.  They recently added masking which is a nice replacement for the crappy masking that Real Studio provides with the TextField control.

RSReport  http://www.rothsoft.ch/realbasic/rsreport/

If you need anything other than basic (and I mean REALLY basic) reporting the built-in reporting tool isn’t all that impressive.  We’ve moved almost everything over to RSReport.  It’s great because you control everything.  It’s awful because you control everything.  Reports take a little longer to design and get running but the drop-in report viewer and the export to PDF capabilities more than make up for it.  They do have a Report Designer component but I’ve never gotten it to work well in my own projects so I’ve not used it.  Their lack of support is a little disconcerting but so far I’ve been happy with it to take the risk.

eSellerate  http://www.esellerate.net/

We use the eSellerate plugin for our own products.  It handles licensing and registration and though they take a cut off the purchase they’ve been fairly proactive in updating their service over the years.  Their RB plugin has NOT been updated for Cocoa so we really have no idea what we’ll use if they don’t update it.

What are you using a lot that’s not in our list?

ActiveRecord for Real Studio

We are Real Studio consultants.  It’s what we do and we do a LOT of projects.  If I had to put a percentage on the projects that are database driven I’d have to say that it’s above 95% for the past ten years.

Real Studio doesn’t have database binding like Visual Basic 6 but it’s not a real big deal.  If anything, the lack of binding makes the code more explicit (i.e. easier to read) and you don’t have to go hunting through control properties to find table and field names.  The Real Studio database classes are generic so it doesn’t matter, generally, what database you’re connecting to.  The drawback to the lack of binding and the generic classes is that it does lend itself to creating the same code over and over and over again.

Because of the nature of Real Studio many users tend to put their db code into the form (window) and tie it to controls.  This leads to spaghetti code with the database specific code all over the place and makes changes to your database harder.  Seth has done two presentations at ARBP conferences 2009, 2011 and introduced attendees to ActiveRecord that we’ve used for years now.

Active Record is a very simple, and limited Object Relational Model (ORM) system.  It allows us to create REALbasic classes that the IDE knows about.  It’s not exceptionally strong with the relational data, or large blobs, but it can be programmed to handle it.

In a new project we’re converting an existing Visual Basic 6 project with roughly 25 tables and several tables have over a hundred fields each.  Using conventional means it would mean having a database editor open so I can copy and paste field names all the time.  However, using ActiveRecord we created the classes (we have a utility to do this) and now the IDE knows the table and field names.  This makes coding very fast and they’re is no worrying about spelling errors and there’s no longer any issue of what the data type is because the class knows what it is.  This is nice since the compiler will pick up any many errors that may not usually find until runtime.

The client was ecstatic after the conversion since he figured that would have taken about 20 hours to convert the VB6 code into something useable in RB.  Instead, between our utility and ActiveRecord it took me less than 4 hours.  So now instead of spending all the time getting classes ready, we’re doing the real work of connecting up the UI to a set of data aware classes.

Another feature that was added was to flag the developer if a field is in the database that isn’t in the class.  How many times do you add a field to the database (or a coworker does) and you forget to hook it up.  This doesn’t happen using ActiveRecord.  You can have class properties that aren’t a field, but if you delete a field property that’s been used in the application the compiler will flag you on it and that’s very useful too.

ActiveRecord makes extensive use of Shared Methods so that all of the database code for that table is access from that class and that class only.  It has a number of methods built-in such as getting a list of rows (in array form) and finding a record by the primary key.  It’s easily extensible.

Like I said earlier, it’s not perfect.  It doesn’t handle relational data at all, but it can be modified to do so.  Large blobs can slow it down, but in the few times this has been a big deal we’ve implemented ‘lazy loading’ where we don’t load that particular field until we ask for it.

We have a single tutorial page up for it now at the main website.  We’ll eventually turn this into video tutorials and we’ll demonstrate it in more video’s.  It’s an MIT style license so feel free to use it.  If you have additions and suggestions, please don’t hesitate to contact us.

More information, and downloadable classes can be found at http://www.bkeeney.com/realbasic/activerecord

Mockups Using Balsamiq

Our Senior Developer, Seth Verrinder, introduces us to a tool for creating simple and effective mockups. – Bob

Like most developers I’ve had to mock up user interfaces for a lot of projects.

In the past I’ve used two approaches for this: a) Get everyone in the same room and share a whiteboard or a piece of paper or b) use Real Studio to create an interface that doesn’t have any code behind it. I’ve even scanned hand drawn mockups and sent those in an email.

I hate using Real Studio (or any other IDE, it’s nothing against Real) to mock up interfaces. The problem is that the end result looks like it’s a real program, so if I don’t make it look nice then it looks like a program that sucks instead of a mockup of a nice program. The whole point of mockups is that nobody is sure exactly what should be on a window or how different parts of a program should fit together so polishing the UI is a waste of time.

Another problem is that a mockup that looks like a finished program is easy to mistake for a finished program by a non-programmer. This is a point I first heard made by Joel Spolsky over at Joel on Software. Unless the goal is to actually design the final interface for a program I would stay away from this approach.

The advantage of the whiteboard and paper approach is that nobody looks at a freehand drawing and thinks that the end program is going to consist of blue lines that aren’t quite straight. But the end result is usually kind of disorganized and it’s hard to store much less revise it in the future.

Enter Balsamiq Mockups. This is a very slick program written by Peldi Guilizzoni (originally written during nights and weekends while he worked at Adobe). It’s basically a wireframe drawing tool with a bunch of standard UI components like buttons, windows, scrollbars, and many more that look like they’re hand drawn. You can drag things around and change labels pretty much like a designer in an IDE except without any real limitations on where things can go since it’s all just a drawing.

The end result is a surprisingly attractive design that could never be mistaken for a working program or an actual UI. Mockups is developed using Adobe AIR and as a developer of native apps for Mac and Windows, I wasn’t sure it would feel quite like a native app and it doesn’t, but it also turns out that it’s been so well designed that it’s actually fun to use and there’s not really any learning curve to speak of. Overall, I highly recommend mockups to anyone who develops software for a living.