Amazon.com Widgets Tech Stuff

Another Gem from the VSoft Guys: TCommandLineParser

By Nick at November 16, 2014 02:02
Filed Under: Delphi, Software Development, Tech Stuff

You know, the gang at VSoft, led by Vince Parrett, have really contributed a lot to the Delphi and the Developer community.  First, they built FinalBuilder – probably one of the best known apps built with Delphi -- and now ContinuaCI for all developers.  And being Delphi developers, they have contributed the DelphiMocks and DUnitX frameworks to the Delphi community.  Recently, they added another little gem to that list – TCommandLineParser.

It’s seems less common than it used to be with “regular” applications, but command line switches certain remain popular and common with console applications.  They are used to pass filenames, boolean values, and other information on the command line. Handling those switches can be a bother, and it’s seems silly to repeat similar code for each application.  This is where TCommandLineParser comes in. 

TCommandLineParser is a library that makes it really easy to add and read command line parameters to your applications. Sure, the RTL provide the ParamStr/ParamCount functionality, but they don’t provide some of the features that TCommandLineParser does.  For instance, with TCommandLineParser you can:

  • Set switches to contain specific value types
  • Easily retrieve those switch values in your application in a simple class
  • Pass strings, boolean values, and numbers and other types

To get started using it, you can pull the code using Git from the following endpoint (You do have Git installed on your machine, right?) :

https://github.com/VSoftTechnologies/VSoft.CommandLineParser.git

The project comes with a simple demo application, but let’s build one ourselves so that we can step through the process and really see how it works.  So, let’s take the following steps:

 

  1. 1.  Create a new Console application by selecting File|New|Other|Delphi Applications|Console Application.
  2. 2.  Make sure that the directory where you put TCommandLineParser is on your path, either for the application you just created or as part of your library path for Delphi.
  3. 3.  In the uses clause of the project file, add the following two units: VSoft.CommandLine.Parser and VSoft.CommandLIne.Options.

4.  Now, add a new, blank unit to the file and call it CLPOptions.pas. This is the file that will hold the class that will end up with all of the command line parameter values.  In that file we’ll have an interesting class – one with nothing but class variables.  Put the following code into the unit.



type
  TSampleOptions = class
  public
    class var
      FileToProcess: string;
      OutputInUpperCase: Boolean; 
      NumberOfIterations: integer;
  end;

This class contains a string, a Boolean and an integer.  Other types that can be passed on the command line include enumerated types, sets, and floating point numbers.  Again, this class will end up holding the values passed on the command line, and since the variables are all class variables, they can be accessed directly without having to instantiate the class. 

5.  Next, we’ll register these items with the TOptionsRegistry class.  This class is the one that translates the command line parameters into options usable by your application.  You can define options as having a long name, a short name, and whether the parameter is optional or required.  The TOptionsRegistry.Parse method will then parse out the command line and fill in the values of the class we defined above.  In order to do that, create a new, empty unit, add it to the project, and call it CLPConfig.pas.  Then, add VSoft.CommandLine.Options and CLPOptions to the uses clause of your new unit.  Then, add the following code to the implementation part of the unit (you can leave the interface section empty):

 
procedure ConfigureOptions;
var
  Option : IOptionDefintion;
begin
  Option := TOptionsRegistry.RegisterUnNamedOption<string>('The file to be processed',
    procedure(value : string)
    begin
        TSampleOptions.FileToProcess:= value;
    end);
  Option.Required := true;

  Option := TOptionsRegistry.RegisterOption<Boolean>('OutputInUpperCase','o', 'The output should be in upper case',
    procedure(value : Boolean)
    begin
        TSampleOptions.OutputInUpperCase:= value;
    end);
  Option.Required := true;
  Option.HasValue := False;

  Option := TOptionsRegistry.RegisterOption<integer>('NumberOfIterations','n','The number of times the file should be processed',
    procedure(value : integer)
    begin
        TSampleOptions.NumberofIterations := value;
    end);
  Option.Required := False;   
  Option.HasValue := True;
  
end;

Here’s what is important to note about the following code:

  • The first thing to note is that each of the calls that registers a parameter takes a parameterized type of the type that should be received as part of the command line parameter. 
  • The first Option registered is an “unnamed” option, meaning that there is no switch or name associated with it.  Normally, a parameter will have a switch (for example “/d”)associated with it.  This option, however, will just be the filename.  The first parameter of RegisterUnNamedOption is a description of the option that will be shown to the user when “help” is displayed.  (We’ll discuss that in a bit).  The second parameter is an anonymous method that lets you do what you want with the value passed in the parameter.  It’s a TFunc<string> and in this case, we assign the string to the TSampleOptions.FileToProcess class variable.  Note that this option is also set to Required, meaning that unless the parameter is present, the application run and the “help” will be shown.
  • The second Option registered is a “regular” parameter, in that it is a switch.  That switch can two values – “/OutputInUpperCase” or “/o”.  These are defined by the first two parameters of the call to RegisterOption.  The third parameter is the help string, and the fourth is an anonymous method taking a single Boolean value that defines the presence or absence of the switch.  Because the Option.HasValue property is set to False, the switch will stand alone, and its presence means the value is True, and its absence means it is False.  In other words, the parameter has no value passed along with it. 
  • The third Option is yet another variation. This one has a switch, but it takes a value, because the Option.HasValue property is set to True.  This means that the parameter will appear as “/o:42”, using a colon to separate the switch from the passed value.  Note that this parameter is set to be optional, because the Required property is set to False.

Of course this procedure needs to be called very early in the executable timeline, so you should add an initialization section to the unit that looks like this:


initialization
  ConfigureOptions;

 

Switches are key to passing command line parameters, and TCommandLineParser will accept the following to define a switch:

  • A forward slash: /d:aValue
  • A single dash: -d:aValue
  • Double dashes: --d:aValue

Note that for options that have HasValue set to False, there is no need to pass a value. 

Of course, once you have set all these options, you need to write some code to retrieve them, and handle the situation when things aren’t right – required parameters are missing, or switches requiring values don’t have them. 

Go to the DPR file and add this code:


var
  ParseResult :  ICommandLineParseResult;
begin
  try
    //parse the command line options
    ParseResult := TOptionsRegistry.Parse;
    if ParseResult.HasErrors then
    begin
      Writeln(ParseResult.ErrorText);
      Writeln('Usage :');
      TOptionsRegistry.PrintUsage(
        procedure(value : string)
        begin
          Writeln(value);
        end);
    end else
    begin
      Writeln('FileToProcess : ', TSampleOptions.FileToProcess);
      Writeln('OutputInUpperCase : ', TSampleOptions.OutputInUpperCase);
      Writeln('Iterations : ', TSampleOptions.NumberOfIterations);
    end;
    ReadLn;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

Note the following about the above code:

  • It declares ParseResult with is of type ICommandLineParseResult.  It will contain the results of parsing the command line when TOptionsRegistry.Parse is called.  The names make that pretty obvious, eh? 
  • If the result of the parsing HasErrors, then the “Usage” of the application is output.  It can be output anyway you like, as you pass the PrintUsage method an anonymous method that does the output in any way you want.  In this case, it simply prints out the value passed in to it.  This is where the “help” parameters above come in.  The PrintUsage method parses out all the registered parameters, grabs all the switch and parameter values, as well as the help string you passed in, and creates a string that shows the proper usage of the parameters.  Before printing that out, the code prints out the actual problem with the usage.
  • If all is well, and all the required parameters are present and properly formed, then the code will simply print out the values passed on the command line.

That’s it for code.  Now for using the application.  First, let’s get a look at what happens when you pass no parameters at all.  Press F9 and you should see something like this:

image

 

Note that you receive error messages, and a description of how the command line parameters work.

Then, go to Run|Parameters and in the Parameters box enter:

somefile.dat -o -n:42

Running the app should result in the following:

image

Which shows that the parameters were correctly passed. 

And that is about it.  It takes a bit of work to get going, but not much, and you get a lot of functionality for the little input that you have to make.

Like I said in the title – another gem from the folks at VSoft Technologies.

Where to Get Delphi Help

By Nick at September 06, 2014 07:48
Filed Under: Delphi, Software Development, Tech Stuff

Sadly, the good old Embarcadero newsgroups NNTP Feed appear to have come to an end.  Alas.  I’ve been a member of those groups in one form or another for over 20 years, starting with the Compuserve forums and ending up with the wonderful and grossly underappreciated NNTP newsgroups.  I believe that Embarcadero is trying to get the newsgroups back up in a read-only status.  Nevertheless, it appears to be time to move on.

So where can we migrate to?  I see three places where the community can communicate and get questions answered.

    • The official solution is community.embarcadero.com.  This is the place that Embarcadero is bringing everything together that formerly was EDN, the Blog server, and the newsgroup server.  This new community has blogs, articles, and Forums.  The Forums are organized by topics rather than products and languages. It takes a bit of getting used to, but we can work with it that way, right?  In addition, there is the Answers section, which has a StackOverflow-like way of asking and answering questions. Overall, it looks like a pretty nice web site, though I know many of us will miss the NNTP forums.  This will take some getting used to, but things move forward, and this is the way that things are going.  I’m on board
    • StackOverflow has a very active Delphi sub-group where you can get excellent, fast answers to your questions.  If David Heffernan doesn’t answer your question, Ken White, Rob Kennedy, Mason Wheeler, Remy Lebeau or some other very active Delphi community member will jump on it.  StackOverflow is a fantastic resource, and if you have a Delphi question, it’s a great place to get an answer. Most often, someone has already asked your question, and the archives have the answer already. I for one will always choose the StackOverflow answer in a Google search as my first choice. 
    • Another place to ask questions and generally hang out is the Delphi Community on Google Plus.  There are almost 3500 of us there, and there is usually some lively discussion, questions being answered, interesting open source projects announced and discussed, and generally a good place for Delphi folks to be.  If you aren’t a member and aren’t participating, you should be.

So for now, those are the places to gather and get help.  Times are changing for the Delphi community, both in terms of what the tool can do and where we will communicate online.  I encourage folks to move on from the newsgroups and try out the newer places to hang out and get help.

Delphi XE6 is Here

By Nick at April 15, 2014 02:17
Filed Under: Delphi, Tech Stuff

Delphi XE6 has been released.  There are reportedly over 2500 bug fixes in it, which is quite a few and quite in keeping with the QPS (Quality, Performance, Stability) plan they’ve discussed.  Probably the best place to find out what is in the release is in the DocWiki’s What’s New Page

 

And if you are ready to make the move, you can click on the banner below and purchase:

Less is More for your CSS

By Nick at October 24, 2012 10:34
Filed Under: Delphi, Software Development, Tech Stuff

As you may have noticed, I made a few changes to the website here at good ol’ nickhodges.com.  I added a column of boxes on the left, with the idea being to make stuff more accessible without so much scrolling.  And, well, yeah, okay, I’ve used that space to add a few more advertisements.

And while I was at it, I cleaned up a few things with the layout and the CSS.  It’s what I did with the CSS that I’d like to talk about today.

The main thing that I did was to start using the CSS pre-processor called Less.  Less allows you to do a lot of things “right” when writing CSS.  The first thing you notice when you start writing CSS is that it is a horrible violator of the DRY principle – Don’t Repeat Yourself – and Less solves a bunch of those problems.  It’s hard to write “clean CSS code”.  Less can help.  Less allows you to:

  • Create a *.less file that is then processed into your CSS file.  You can do this manually with a command line preprocessor, or you can do it on the client-side with Javascript.  Below, I’ll discuss how I pre-processed my *.less file automatically
  • Declare variables for colors and other things.  Say you have a color that you use in a number of different places.  You can declare

         @WidgetBorderColor: green;

    and then everywhere you had to type green, you could put @WidgetBorderColor instead.  Then, if you want to change from green to red, you only have to do it in one place.  That is really nice. 
  • You can also declare mixins – or chunks of CSS code that are commonly used.  For instance, if you have a bunch of places that use  

         {padding: 0px; margin: 0px}

    then you can declare

         .p0m0 {padding: 0px; margin: 0px}

    and use that as an “alias” in your *.less files

       body {
        .m0p0;
        font-family: Verdana;
        font-size: 13px;
        color: @Black;
        background: @White ;
       }

  • You can also use parameters to pass in to your mixins if you want, an other more complex constructs, though none of it is terribly difficult.   The Less page has all the documentation in one place.  The two features above were what I used in an effort not to repeat myself in my CSS.

Once you have your less file set up, you can process it via the command line, or using a GUI compiler tool.  Because Less is written in Javascript, you can use node.js to run it on your local machine.  To do that, you can download the Node Package Manager and then install  Less by simply executing

npm install less

npm is kind of interesting – it’s an online registry, so when you issue the above command, it goes out to a public registry and finds the Less package and simply installs it – there’s nothing for you to install. I guess it is much like Nuget in that regard. 

After that, you can then execute the lessc compiler. 

So the workflow at this point is:

    1. Write CSS and Less code in a *.less file
    2. Compile the *.less file into a *.css file.  (For instance, I use a batch file with:  c:\Code\node_modules\.bin\lessc C:\NickHodges\themes\nick\style.less c:\NickHodges\themes\nick\style.css
    3. Deploy the new CSS file with my site
    4. Repeat as necessary

Step 2 is kind of a bother, though.  You have to shell out to the command line to do the compile.  Who wants to do that if you don’t have to?

Well, I sure don’t.  So I found a cool tool called WinLess which does a nice thing – it automatically compiles your Less code into CSS every time you save your *.less file.

image

It works great – you just point it to your *.less files, and whenever you save changes, it automatically compiles the Less code down to CSS.  That way, your CSS is always up to date, and you just have to worry about your Less code.  Maintaining the CSS file is totally painless.  So now the workflow is:

  1. Update your *.less file as desired
  2. Save
  3. Deploy your *.css file.

That’s a lot easier, eh?

Now what I really want is a tool to find patterns in your CSS and automatically turn them into Less entries.  That would rock.

CSS is powerful and cool, and you can’t create a well-designed website without it.  But as a language, it’s not really very “best coding practices friendly”.  Less makes it much more so.  If you set things up correctly, you can do your styling in Less and forget about CSS altogether.

What do you guys do with your CSS?

My Take on TypeScript

By Nick at October 17, 2012 12:43
Filed Under: Delphi, Tech Stuff, Software Development

Microsoft has been keeping the renowned Anders Hjelsberg busy on a new language called TypeScript.  Typescript is an open-source project (using the Apache 2.0 license) that allows you to write a super-set of Javascript that allows for a stronger typing system.  You can watch Anders’ original launch presentation

I’ve said a million times that I’ve said a million times that Javascript is the new Assembler – that Javascript will become the thing that everyone compiles higher level code into.  You’ll write your web apps in a higher order language, and then compile them to Javascript for execution in the browser. 

I refuse to believe that any rational person actually likes to write Javascript, and as it is designed currently, it really isn’t a language for developing the kind of large-scale applications that people seem to be wanting to use it for.  In the deep, dark past, Assembler used to be all there was, and we created higher order solutions that compiled to assembler.  And in the same way, for a while, Javascript was all there is for the browser.  Now, however, we are beginning to see higher order languages being brought to bear to produce Javascript for us. 

If Javascript is the “new Assembler”, then the Browser becomes the “new operating system”.  The cool thing about that is that the “new OS” is ubiquitous.  Just about every computer in the world – computers running Windows, OS X, Linux, Unix, whatever – has a browser that runs Javascript.  That means your application can run on any computer.  That’s a very compelling idea.

You can actually do that today with Delphi using a very cool tool called Smart Mobile Studio.  There is also the Elevate Web Builder tool from Elevate Software.  Both have the same idea – leverage the power of Delphi to produce Javascript-based applications.  Pretty cool, really.

Anders talked to Scott Hanselman about Microsoft’s offering in the “Language to compile down to Javascript” arena in the latest episode of Hanselminutes.  Anders is always a good interview – I love a guy who thinks and speaks as clearly as he does.  (That’s why I always loved a Danny Thorpe presentation.  Danny is pretty quiet and mellow, but his talks were always so clear and well organized – every single word he said was worth listening to – that they were always excellent and enormously educational.  Anders is the same way….) He does a great job discussing the notion behind TypeScript.

Here are some of my thoughts on what Anders said and on TypeScript in general.

  • TypeScript seems to exist for two reasons – to make Javascript “tool-able” and scalable. 
    • First, the type annotations, classes, modules, and other enhancements exist to allow Visual Studio and other IDEs to do things like Code Completion (the RAD Studio term that Anders used in the podcast instead of Intellisense – I loved that.  Smile  ), refactoring, and other language-based features that modern IDE’s do.  Javascript doesn’t provide enough information to let development tools do all the things that we expect, but TypeScript does. 
    • Second, TypeScript is also a way to make Javascript scale. By providing the notion of typed classes and modules, you can create larger, well-organized TypeScript applications which then compile to Javascript.   TypeScript is a language ready to do the heavy lifting that Javascript cannot.
  • Since TypeScript is a super-set of Javascript, it follows that pure Javascript is valid TypeScript.  Anders points out that you can use your existing Javascript as is inside of TypeScript.  The idea, though, is that TypeScript becomes the language you’d use instead of Javascript because of all the tooling support, and because it can be used to build applications via modules (units, for you Delphi folks).    Typescript doesn’t have any runtime or virtual machine – it literally just compiles to Javascript. 
  • You can create an external declaration file to define the types in your *.js file, so that means that existing Javascript libraries like Node.js and jQuery.js can be “typed” and thus used in the TypeScript environment.  I think that is a pretty cool idea – and I’m sure that Microsoft will be delighted if the community follows their lead and “converts” the existing popular libraries.
  • Anders also points out that TypeScript puts a “dial” on the typing level of your code.  Pure Dynamic advocates can leave everything untyped, and the strong-typing zealots can type everything if they want, and the folks who want to type some things and not type others can do that if they want.  That’s a very interesting notion – a language with a variable level of type-safety.

Now one thing to note is that tools like Smart Mobile Studio and Elevate Web Builder offer pretty much all these features as well.  There isn’t any reason that Embarcadero couldn’t make Javascript be something that is output by the Delphi compiler.  Heck, there is even a project out there to get LLVM to produce Javascript.  TypeScript would integrate well into HTML5 Builder. Whatever higher-end language you want to use, it seems pretty clear to me that Javascript will be the thing our compilers will be producing in the not-to-distant future.

Are you going to give TypeScript a look, or are you more interested in the Delphi-to-Javascript solutions?  I’ll probably check out both.  Either way I have to use a different IDE, so I’m guessing I’ll lean towards the Delphi-based solutions.  Plus, I frickin’ hate curly braces.  Winking smile

What do you guys think?

Flotsam and Jetsam #64

By Nick at September 05, 2012 19:00
Filed Under: Flotsam and Jetsam, Tech Stuff, Delphi
  • Jim McKeeth was kind enough to interview me for the The Podcast at Delphi.org.   It was fun to do. 
  • In a previous Flotsam and Jetsam, I mentioned that I had received as gift an ASUS RT-N16 and loaded it with the TomatoUSB firmware.  So far, it’s been working great – I really like it.  The reason I did it was to be able to have better control over the Quality of Service so that I could install an Ooma Telo  Well I have done so, and am quite pleased. 
    • I paid the $40 to have my number changed over.  It took about ten days, and now I am running the Ooma as my house phone. 
    • I got the Ooma Telo from Amazon for $150 (a special price, apparently, as the price appears to have gone up), and paid $40 for the number transfer.  I have cancelled my phone service from Comcast, saving about $50 a month.  That means that the Ooma Telo will pay for itself in four months, and save me a pretty good chunk of change going forward.  
    • And here’s a fun thing about the Ooma – I can take my home phone with me.  If I say, take a trip to my folks house, I can bring the Ooma, plug it in, plug in a phone, and I have my “house”  phone there wherever I am.  I don’t know why I find that amusing. 
    • One concern I had was the fact that if the power goes out,  my phone goes out.  But that’s true for my Comcast phone as well, though it would take a while for the battery to wear out.  In addition, we live in a development with lots of neighbors, and we have cell phones.  And lots of people are starting to get rid of their house phones all together, so that turns out to be a minor concern for me anyway.
  • Alas – Barry Kelly has moved on from Embarcadero. His contributions to Delphi are many and lasting.  I don’t know if I’ve ever met a smarter person, frankly. He’s also just a very interesting guy generally.  Good luck to you, Barry.
  • I won’t be the first Delphi book on LeanPub.  Currently available is Parallel Programming with OmniThreadLibrary by Primož Gabrijelčič.  (You did catch that I am writing a book, right?)
  • There are some pretty cool goodies that you can get if you buy RAD Studio XE3 right now, including a FireMonkey grid from the excellent folks at TMS Software.  It’s called the RAD XE3 Bonus pack. 

Flotsam and Jetsam #61

By Nick at August 11, 2012 06:54
Filed Under: Flotsam and Jetsam, Delphi, Tech Stuff
  • I’ve never been a hardware or network geek, but after I read this post by Jeff Atwood about how easy it was to set up custom firmware on a router a few notches above the “cheap one they basically give you when you sign up for cable internet”, I thought that I might try it some day.  I put the Atwood-recommended Asus RT-N16 on my Amazon wish list, and lo and behold, my parents kindly gave it to me for my birthday in July.  I actually left it sitting on the shelf for a few weeks, unsure if I really wanted to use it until a friend at work told me about Ooma.  Ooma is a phone service that works over your internet connection.  It’s not true VOIP, but similar.  Once you buy the device and get it set up, you basically get free phone service (I guess you pay some taxes or something each month, but only like $4 or something).  The Ooma should save me $50 a month.  Nice.  Anyway, if you have an Ooma, you really need a router that supports Quality of Service so that your phone calls don’t get aced out when your 13 year old starts downloading some huge game or something.  So today, I broke out the router, and used these instructions to flash the firmware on the Asus router, and now I’m up and running with TomatoUSB.  Very cool.   My next step is to buy the Ooma box and get that set up.  I’ll keep you all posted, as I know that you are eager to be updated on every single little thing I do.
  • You know, I just love all the stuff that the folks at DevJet are doing.  First, they are the impetus behind the Delphi Spring Framework, which as far as I am concerned you should treat like part of the Delphi RTL, as well as the really cool tool Documentation Insight.  Now they have release a new product that is the mirror to Documentation Insight – Documentation Generator.   You can pre-order it for 30% off, too.  What does it do?  Well, it takes all those great /// comments/documentation you wrote using Documentation Insight (which, by the way, is bundled with Delphi XE2) and turns it into online content.  For instance, here is the documentation for my HTMLWriter project.  And of course, all the documentation for the Spring4D project is online as well.  Nice.
  • There are some interesting Delphi book projects in the works:
  • Nick’s Opinion of the Week:  I think that if someone wants to open source their software, then they should do so.  And if they don’t want to open source their software, then they shouldn’t. And if you have a different opinion than the author of the software, then you should express it respectfully.  If your “advice” isn’t taken, then you should leave it be.  Just sayin’. 

On Why I Think Twitter is Awesome

By Nick at March 04, 2012 11:57
Filed Under: TechBiz, General, Tech Stuff, Software Development, Delphi

I have this friend who totally doesn’t get Twitter.  He doesn’t get it so much that it actually kind of makes him angry that anyone does get – and like – Twitter.  To him, it is a total waste of time in every way. He can’t imagine why anyone would spend any time at all having anything to do with Twitter.  And that’s fine – to each his own. But I do find it amusing that someone would feel that way about a service used and enjoyed by millions of people. 

I’m a Twitter lover.  I find it entertaining, amusing, interesting, and good for my brain.  I really enjoy reading it, and I really enjoy posting tweets.  I get good news, good development information, and a good laugh when I read twitter.  I get to express my self in short bursts that  help me formulate my thoughts.  What’s not to like?

The common impression is that Twitter is for “letting you know what your friends are doing” – or at least that is how it was originally marketed.  The common misconception is that Twitter is just a bunch of people posting “Now I’m eating lunch.  Yum!”, and perhaps it was that in the very beginning.  But in the spirit of “Let a thousand flowers bloom”, Twitter became a lot more than that.  Twitter is a forum for expressing not only what you are doing, but what you are thinking, what you are watching, what you are reading, and anything things that you are up to.  It is many things.  It is a means of conducting a conversation across the world.  It is a means of sharing information with like minded people .  It can help you track your customers are thinking.  It can be a source of entertainment.  It can ensure you are up to date on the latest news, and it can even help foment a real live revolutions.  Not bad for a site that posts things  140 characters at a time.

Short and Sweet

Here’s the main reason why I like Twitter:  It forces us to express ourselves in short, concise sentences.  140 characters isn’t a lot, but it’s not nothing.  It is sort of real-world application of Strunk & White’s exhortation of “Use fewer words”.   It’s really quite amazing the amount of humor, wisdom, and pith people can cram into that little chunk of text.  Anyone who cruises around the internets knows that, while it allows people to publish openly without the barrier of a publishing house, folks – this blog included – don’t get the benefit of an editor.  Twitter is the one place where you can know that if you read it, you’ll get things in short, concise, crisp chunks.  (And I should add that I pride myself on never using ‘4’ and ‘2’ and other similar shortcuts….)

I find that pleasing as a reader, and valuable as a writer. If I can express my thought in 140 characters, then I know that I’ve really distilled it to the essence of the thought.  For instance, it took a while for me to get Hodges Law down to 140 characters but I did.  (And I also now have the added advantage of it being in a single place that I refer to my awesome idea – as well as showing that I was the first to think of it.  Winking smile  )

The other big reason I like Twitter is that it is an “easy read”.  If I have a few minutes to kill, I can pull out my Kindle and flip through the latest on my Twitter feed. I’ve knocked out more than a few pages of Twitter feeds at the Doctor’s office.  It also is perfect for solving that First World Problem of being bored while, ahem, “indisposed”.

Third reason?  It’s a wealth of information about Delphi and software development.  Many great developers tweet, and point to articles and blog posts that teach and explain about development.  Want to know what the latest Delphi articles are?  Follow DelphiFeeds.   You can’t say it is impossible to know what is going on with Embarcadero – they have a Twitter feed that updates with just about everything going on with the company.  You can tailor your feed to bring you whatever you are interested in.  I’m interested in Software Development, the NBA, specifically the Timberwolves, certain American Idol contestants, and generally funny stuff.  That’s exactly what my feed brings me. 

HashTags

Another feature that is both fun and powerful are hashtags.  As far as I know, the power and coolness of hashtags was actually an invention of the Twitter community and not an original part of the “spec” for Twitter.  According to this article – which is a great history and summary of hashtags -- the idea actually came from a guy named Chris Messina, and his idea has become part of the power of Twitter.  Hashtags are used to create groups or topics.  Sometimes they are fleeting – like a hashtag for the Superbowl – or sometimes they are ongoing, with people constantly adding to them, like the “#overheardathome” tag.  Want to see what others are saying while American Idol is on?  There’s a hashtag for that.  They have even made a difference in world events.  The valiant folks fighting for freedom in the Arab Spring used twitter hashtags to inform the world and each other about important, world-changing events.  Businesses are event starting to include hashtags in their advertisements (and of course, folks aren’t always respectful of those tags…..)  There’s even a website dedicated to tracking the use of hashtags.  From the humble beginnings of an idea from a single users, hashtags have made twitter into a useful and powerful communications medium.

Comedy

It may have started out as a site to tell your friends that you are eating lunch, but Twitter has become a great place for some quick-witted comedy and entertainment.  Heck, I tweet a lot about technology and programming, but I try hard to make a witty, funny comment every once and a while.   Some people’s sense of humor is just made for Twitter.  One of my favorites is Josh Hara.  If you are looking for a series of laugh-out-loud funny, but off-color tweets, look no further than Pauly Peligroso.    There are tons of lists of (allegedly) funny people on Twitter.  I should add that in my experience, the people that are “supposed” to be funny – that is, comedians whose names you know – aren’t really that funny. But hands down, bar none, the funniest feed on Twitter is Sh*tmydadsays.   In any event, Twitter can definitely make you LOL.  (I only use “LOL” when I, well, actually do laugh out loud. You should follow the same rule.)

Parody and History Sites

Another feature that dovetails on the straight comedy sites are some of the excellent parody sites.  There’s a whole slew of Star Wars characters on TwitterLord Voldemort of Harry Potter fame is enormously popular, on topic, and very funny.  He and Severus Snape often exchange barbs.  (Actually, there are quite a few folks tweeting as Severus Snape on Twitter….)  You can keep track of Batman, Drunk Superman, Aquaman  (Warning: he’s a little….”salty”), Spiderman, Drunk Hulk, and just (presumably sober Hulk. (Apparently there are many facets to Hulk’s personality). Want some history? You can follow Henry VIII, Calvin Coolidge,   You can follow the history of the Byzantine Empire, the first 1000 days of the JFK administration, and real-time events of World War II.  And that is just scratching the surface.  Believe me.  There is no end to the inanity, craziness, and imaginativeness of the folks on Twitter. 

In The End

Yes, Twitter would be boring if it were nothing more than people telling you what they were doing.  It may have been that at one point, but it’s become way more than that.  Shoot, a recent cover of Sports Illustrated had a hashtag for the cover article about Jeremy Lin. In the end, Twitter can me what you want it to be.  You can follow technologists, pop stars, actors, authors, characters from books and movies, business, news sites, newspapers, bloggers, family members, humorists, athletes, historical characters, and more.  You can keep up with technology, world events, politics, all manner of news and events, what your favorite authors/actors/singers are up to.  It’s really a huge, fascinating party that you can control to your heart’s content. 

Why anyone wouldn’t be interested in that, I have no idea.

My Amazon Kindle So Far

By Nick at February 11, 2012 21:59
Filed Under: General, Tech Stuff, TechBiz

A while back I wrote about why I got my Amazon Kindle Fire, and in that post I promised you that I’d write about my thoughts about owning the Kindle.  And since I’d rather rub shredded fiberglass in my eyes than break a promise to you fine people, here are my thoughts on owning an Amazon Kindle

  • First, I want to say that I also am an Amazon Prime customer, so what I talk about below may include benefits of being in Amazon Prime.  Those benefits are actually quite numerous considering the $79 annual price tag.  If you are at all involved with Amazon, I’d give the Prime membership a good look.   You can save a lot of postage – and a lot of time and gas – with Amazon Prime.  “Gas, you say? How?”  Well, I’m glad you asked.  Here’s an example:  I don’t drive to the Pet Store anymore, because I just have Amazon ship me – at no charge and with no sales tax – my dog food.  And cat food .  And that is just the beginning of what Prime offers.  I’ll leave it now to say that it’s a pathetically good deal if you have even the remotest notion of buying things from Amazon, and point out some more specific things as I go along.
  • The second point to make is that at $200, the Kindle Fire is pretty much a loss leader for Amazon.  I don’t know for sure what it costs to make the Kindle Fire, but I’m guessing that Amazon is selling them at a loss or very close to it.  And the reason is that the Fire is, in Amazon’s eyes, merely an Amazon content delivery device.  They want to get this device – a Kindle – into your hands. At $200, it’s an attractive tablet that runs Android apps, had a dual core processor, a color screen and has all the advantages of a Kindle.  Sure, any tablet can run Kindle software, but as a Kindle, I  can do things like borrow a free book a month from the Kindle Owners' Lending Library (another Prime perk….) as well as watch Amazon Video (another Prime benefit…) on the device.  I can store all my Kindle content (another Prime benefit….) with unlimited space on the cloud, including magazines, books, and music. 
  • The Kindle Fire is pretty impressive hardware. It is a dual core processor, and a very nice seven inch IPS screen. I haven’t really ever thought that it was slow because of processor power. It seems plenty powerful to me.
  • Things I like to do with a tablet (and that don’t really matter that it’s a Kindle Fire….)
    • Read Twitter.  I’ve taken twitter off my phone because now I can….
    • …actually read the web article on a link from Twitter instead of putting it in Instapaper because my phone makes it too hard to read the link. 
    • Watch movies and TV in bed with a nice, crisp seven inch screen. The Fire is really easy to hold however I like.
    • Play games. The screen is big enough to actually see the cool graphics on some cool games. I’ve taken all games off my phone, and the Fire has become a nice little tool for wasting some time.
  • Things I like to do with my Kindle fire (because it is a Kindle…)

Miscellanea:

  • Nice: One thing I like is the “Lock screen” feature which locks in screen orientation.  Sometimes you want to lie on your side and still read in portrait mode even though you are holding the device in landscape mode.  I like that. I suppose that  other tablets have that – I don’t know – but I do like it’s easy access.
  • Nice: Amazon's Android AppStore gives away a paid app every day.  Mostly it is cheesy games, but every once and a while you can get a nice paid app.  While not the Android Market, you can get many of the apps you want from the Amazon AppStore, including things like NetFlix, Pandora, Evernote, etc. 
  • No Google apps, though.  I guess I’m not 100% clear while Amazon blocks Google apps. I guess they view them as a competitor. I sure would like to be able to run Google Mail and Google Calendar on it. I also prefer Google Music, but Amazon’s music is workable. It is a bummer not to have the Google/Tablet connection.
  • To add insult to injury regarding the above note, there really isn’t even a decent third-party calendar app in Amazon’s store. Alas.
  • Bummer: The device has no camera, no microphone,  and no GPS.  This is okay, because the GPS on my phone works much better when I’m driving.  The camera on my phone is as good as any they’d put on the tablet.  I pretty much have my phone with me all the time, so those missing features in the Fire aren’t a problem. 
  • Bummer:  The Kindle Fire runs Android, but it is a very customized and restricted version of Android.  As a result, the device has no Google apps, including no access to the Google Market.    However, if you want, you can root it (though if you do, you lose the ability to watch free Amazon Prime videos).  You can then sideload the Google apps.   You can sideload apps without root access, but it is a bit of a crap shoot whether any given app will work.  (Here’s a good open letter to Jeff Bezos on this topic, the general sentiment of which I support.  I don’t’ regret my Kindle purchase, but it would be a really, really awesome tool if I had the Google stuff on it.)
  • A Bit Strange: There is only one physical button on the whole device:  the power switch on the bottom.  This means no volume rockers, which Android users are kind of used to, I guess.  It hasn’t bothered me too much, but I know that it is something that bothers other users.
  • Bummer:  Amazon advertises their custom Android Silk browser as “lightening fast”, but my experience has been, uhm, different.
  • Nice to Know: I have kept my device “Kindle-ized”, but if I wanted to, there are Android ROM’s available for the Kindle Fire if I wanted to move the device to be a “pure” tablet.  But again, I’d lose the advantages in Amazon Prime of the device being a Kindle.

Final verdict:  I’m happy with my Kindle Fire – I like using and having a tablet – but I’m going to save up an buy a “real” tablet in the fall.  I’m interested in the Google Nexus Tablet – or at least in concept.  I like having a Nexus phone, and I’d like to have the same thing in a tablet.

…Wherein I Rant Vigorously About Mobile Twitter Clients

By Nick at February 04, 2012 15:23
Filed Under: TechBiz, Tech Stuff, General, Delphi

I am now going to go on a rant about Twitter clients – mobile Twitter clients in particular (though some desktop clients are rant-worthy as well).  I am going to do this because I can’t understand why they are such a pain in the ass and work so badly, when they could so easily work so well.

Okay, first, don’t get me wrong.  I really like Twitter.  (If you want, you can follow me, I’m @nickhodges --  no surprise in that handle, eh?)  I like it because it’s a great place to keep up on news, find interesting articles, read funny stuff, and to post your thoughts in short, pithy statements of 140 characters or less.  It’s also a great time killer.  If you are waiting at the doctors office, it’s a much better way to pass the wait than looking at a two and a half year old copy of People Magazine.  It’s interesting, fun, never the same thing twice, and frankly, I’m a little addicted.  I do almost all of my twitter reading on my phone or on my wonderful Amazon Kindle

But yet reading Twitter on my mobile devices drives. me. crazy.  When it comes to mobile Twitter clients, I’m not addicted -- I’m inflamed with a rage that burns like the heat of a thousand suns.

I’ve tried just about every one out there. They all drive me insane.  And so here is  my rant:

  • A twitter client should never, ever, ever, under any circumstances, for any reason, at any time, ever, ever, EVER move my “cursor”.  EVER. And by “cursor” I mean my location in my Twitter stream.  I determine where my cursor goes, not you, you blasted twitter client that thinks you can just show me whatever you want when you want to.  If I am reading Twitter on my phone, leave off on a funny Pauly Peligroso post, go away to another app, and then I come back, you darn well better have my twitter client looking right at that same stinking Pauly Peligroso post when I come back.  I don’t care if I’ve been gone for five minutes, five hours or five years, you flipping better have your cursor right there where I Ieft it. Not anywhere else.  Where. I. left. it.  Leave a gap if you have to. I don’t care, just leave it. Don’t try to do me a favor and “catch me up”.  If I need catching up, I’ll get myself caught up. Give me an option to get caught up, fine.  But for the love of Adam Sandler, DON’T MOVE MY POSITION IN MY TWITTER STREAM.   Ever,  ever, ever, never, ever, ever. 
  • Second, if you tell me that there are “143 new tweets”, and I say “Great, some new tweets”, put me at the freaking START of the 143 new tweets, not at the current time!!!!   Why in the name of sweet baby Dick Van Dyke would I ever, ever, ever what to start at the most recent tweet out of those 143 new tweets? Why would you tell me that there are 143 new tweets and then start me out at the point where there are zero new tweets? Why do I open up the fracking client and see some tweet from three seconds ago, when I want to read the 143 new tweets?  Why do I have to manually scroll down and try to figure out where the new tweets start?  What is that, some kind of sick, twisted joke?  Really?  I have to scroll?  Seriously?   I mean this is basically a variation of the “Never move my cursor spot”, but come on, this is ridiculous.
  • Third – stop trying to shorten my shortened URL’s.  I’m smart – I can shorten my URL’s myself.  It’s nice you want to do that for me, but at least let me opt out of it.  Nothing says “wasted time and resources” as a link that is a Twitter shortened version of a bit.ly link that started out as a tinyurl.com link.  I mean, come on, I can keep my twitter posts under 140 characters myself.  I don’t want your help.  I don’t need your help.  Stop it.

Bottom line: Mobile twitter clients stink and they make me want to bash public monuments with a sledgehammer. (I’d never do that, really, but I want to when I go back from checking my mail and the stupid TweetCaster moves me to  a tweet that was posted 23 seconds ago.)

Phew, okay, I feel better now.

Why I Prefer Android to iOS

By Nick at January 16, 2012 10:54
Filed Under: TechBiz, Tech Stuff, General

I have an Android phone – a Samsung Nexus S 4G which I love. It’s a "pure Google” phone in that it’s sponsored by Google and doesn’t have any of the vendor specific stuff on it that some of the carriers like to include.  And as you know, I just bought an Amazon Kindle which has a version of Android on it.  I’m still saving up for a full-fledged, 10 inch Android tablet.  I really like Android. 

And I have no interest at all in the iPhone, the iPad, and their accompanying operating system, iOS.

So I thought I’d explain why.  There are a number of reasons why I like Android and generally avoid Apple.  Here they are:

First, I really like that Android has the notion of a desktop similar to Windows.  On it you can place all kinds of things called “widgets’ – clocks, weather updates, twitter feeds, Facebook timelines, and shortcuts.   They are all available instantly on the pages of your desktop.  You can put almost anything you want on your multiple pages of the desktop.  I have one touch access to turning on and off things like WiFi and sound.  I can turn on the “Flashlight” (the camera flash) with a single touch of my desktop.  I can read news headlines just by swiping to my “news page”.  That’s a lot of power without having to hunt for and find a specific app.  The desktop on iOS (if you can call it that) is nothing but a listing of the applications on the device.  That’s fine as far as it goes, but the Android desktop provides a lot of very valuable and cool functionality.  I find that very useful.

Not only does Android provide the notion of a desktop with Widgets, it allows you to configure almost any aspect of the system.  You can choose from any number of configurable, intelligent keyboards that make typing easier.  You can pick from an array of desktop launchers that work in ways you might prefer.  You can choose launchers for efficiency, for visual appeal, or for configurability.  Or for all three.     You can even customize the lock screen if you want.  Again, this is really cool and I prefer it over the limited system that iOS provides. In the end, you have complete control over the appearance and functionality of your device – something I really value.

And the reason that Android provides so much flexibility and power to the user is that the OS is open source.  Developers can see how the OS works and build apps, launchers, and widgets accordingly.  And of course, they can even modify the operating system itself.  In addition to the Android Open Source Project, there are a number of alternative operating systems.  The most popular are CyanogenMod and MiUi.  Some handset vendors lock down their bootloaders, but most are wising up and allowing users to easy root their phones and modify them in ways of their choosing.  The stock systems customers buy are plenty powerful, but if one is so inclined, one can completely control what runs on the phone.  Sure you can jailbreak your iOS devices, but you are still stuck with the single, closed operating system.  Android users have no such restrictions.

Since the system is open, there are multiple ways to get applications.  Android users can get apps from the Google Android Market, from the Amazon AppStore, and other places like AppBrain, and they are perfectly free to “sideload” applications from any source if they so choose.  There is no single, controlled point of entry for applications.  That’s cool. And hey, maybe you don’t like Flash, but at least you can run it on an Android device if you want to. And oh yeah, you don’t have to pay for the privilege of distributing your apps, nor do you have to get “approval” from the AppStore gods.

And of course, Android customers have a wide choice of hardware as well as software.  The iPhone and the iPad hardware is cool, and yeah, you can have any choice of hardware you like -- as long as it is the hardware Apple provides.  Android phones and tablets come in many sizes, colors, and flavors.  Most come with removable and configurable storage. They come from different vendors and carriers. (iPhone initially launched with one (1!) choice of carriers, slowly moved to two, and now begrudgingly added a third.) They progress and advance more quickly.  Each vendor competes to out do the other in providing features and power.  You can already buy quad-core Android tablets.  

Now let me be clear:  If you like Apple, love Apple, or even are an “Apple Fanboi”, that’s fine with me.  Knock yourself out.  You won’t get any argument from me.  We all have our preferences, and if you prefer Apple over PC’s and Android, that’s great.  I’m not going to get into a flame war over “My OS is better than your OS”.  I’ve been there, done that, and frankly, I’ve grown out of it.  I happily admit that I was an immature fool to engage in those kinds of discussions.  You like Apple?  Awesome.  I don’t myself, but live and let live, eh?    I know it is too much to hope that the comments won’t prove to be contentious, but I myself am not going to get into a debate.  I’m just expressing my opinions here, and am 100% fine if you disagree 100% with me.

And easily one of the coolest things about Android is the whole Google eco-sphere and cloud.  Android is completely integrated with all the Google apps that we know and love:  Gmail, Maps, Docs, Reader, Tasks,  Google+, Google Music, everything.  A single sign-on brings it all together on your phone, on your tablet, and on your desktop computer.  There basically isn’t a Google App that isn’t completely integrated with Android.  And because the Google cloud is completely open, third-parties can easily integrate into it and use its functionality to enhance what Google provides. For instance, gReader is a third-party app that leverages Google Reader to provide a better RSS experience on Android.  Integrating with what Google provides is easily one of the most powerful and valuable features of Android.  Okay, call me a Google FanBoi, but there is a lot of cool power there that I really like and  use.

But at a more basic level, one of the more fundamental reasons I prefer Android is that, well, it’s not made by Apple.  I do not – and never really have – liked the way Apple does things.  I don’t like how they strictly and ruthlessly control their eco-systemsI don’t like the way that they treat developers.  I don’t like how they use lawsuits to try to stifle competition  (I thought the “look and feel” wars were over, but I guess not).  I’m perfectly happy to admit that Apple makes wonderful hardware and has blazed some important trails in many ways.  That’s all well and good – I just prefer not to do business with them.  Moreover – and I agree that this is harder to qualify --  I’ve never really like the “hipster, holier than thou” attitude that seems to emanate from the Apple community.  I know it’s totally my problem, but as far as I’m concerned,  the smuggest place on the planet is the center of an Apple store. And I don’t do smug.  I literally shake my head and snigger constantly when I take my daughter there (She has a Mac – despite my best efforts to persuade her otherwise...).   I know that’s not really rational, but that’s just how I feel.

So in summary, I like Android because it really doesn’t lock you in to anything.  It doesn’t lock you into hardware, application sources, carriers, or operating systems.  Just as DOS/Windows was more open flexible, and easy to develop for back in the early days of personal computing, so is Android currently the open, flexible, easy to develop for platform on portable devices.  I totally get that openness has it’s price – but I preferred the openness then, and I still prefer it today.

Why I Bought a Kindle Fire

By Nick at January 14, 2012 09:47
Filed Under: TechBiz, Tech Stuff, General, Personal

Last week I became the proud owner of a Kindle Fire.  I know that in my last post I spoke a few unkind words about Kindles, and so I wanted to write about why I decided to get a Kindle after all.

Here at our house, we are in Debt Assassin mode, so I have very little leeway for discretionary purchases like a tablet.  I get a monthly allowance to spend on anything I want, so if I want a new tablet, I have to save up.   I decided that I wanted a tablet earlier in the year, and I originally set my eyes on a Samsung Galaxy Tab 10.1 which at the time was the Android tablet to get.  (I have a blog post coming up about why I prefer Android over iOS…)  It is still a very nice dual-core tablet, but as things go in the tech business – and since it took me a while to save up my pennies – technology marches ever forward and I soon switched to wanting the more powerful and more feature-rich ASUS Transformer Prime

The Transformer Prime is a really, really sweet tablet.  It’s a quad-core machine using the Tegra-3 chip, with an amazing 1280x800, ten finger multi-touch screen.  It  has a flexible, add-on keyboard that effectively turns it into a notebook computer.  It even had a fifth core which would do minor tasks like check email and other background tasks while the screen is asleep.  It was priced right at that sweet spot of $499.  Interest was very, very high in this device, and all the Android blogs and news sites were abuzz with anticipation. 

It was supposed to be available just before Christmas, but pre-ordering the device was troublesome.  Amazon, which has a very good policy of not taking pre-orders unless it is sure it can deliver them, stop taking pre-orders in late November.  Delivery dates for other vendors were unclear.  When Amazon did start taking orders again before Christmas, they listed fulfillment as 5-7 weeks out.  Clearly ASUS had that good problem you don’t want to have – demand far outstripping their ability to deliver on that demand.  As a result, I held off on placing my order. 

But then a few hiccups began to occur.  I suspect that because it was the first tablet to use the Tegra-3 Quad-core chip, they had some problems with the product.  While initial quick-looks were very encouraging, reports started to surface of problems with wireless receptivity and the GPS.  Apparently the actual physical design of the case was causing reception problems.  These reports didn’t seem to dim interest in the device, however, as it’s still hard to get a hold of one, and as of this writing, Amazon itself isn’t taking orders, instead is is fulfilling the order via a reseller – who currently is jacking up the prices to over $600.  FInally, though it was short lived and ASUS pretty quickly backed down, word came out that ASUS had locked the bootloader for the Transformer Prime. 

Okay, so given all that, I decided to hold off and see what would happen.  ASUS was actually pretty good about acknowledging and fixing the problems, but I decided to defer my gratification (I was pretty jacked up for getting a tablet, and it was hard to wait…..) and let things shake out.  But then again, I wanted a tablet now.  And of course, as I’m holding off, Google announces their “Google Tablet” and that catches my eye, because I have a Nexus S phone and I’m a big fan of the whole “pure Google” concept. However, that isn’t coming out until the fall.   What to do?

Well, I took the advice of one of my co-workers and decided to get the Kindle.  His advice was this:  Tablets actually can have an impact on your life – you don’t know how it will fit or what role it will play. $500 is a lot to spend to find out, so get the Kindle at $200, find out how tablets work for you, and then save up for the Google tablet or whatever tablet is the “must have” tablet to get when I’m ready to buy.  Plus, the Kindle will likely hold it’s value, and I’ll be able to easily sell it when I decide to make the move.  In a sense, the Kindle is a “Starter Tablet” for me, and a pretty inexpensive one at that. 

And so far, I really like my decision.  I still have a pretty good chunk of change in my “saved up allowance” envelope (no sense putting it in the bank with interest rates hovering a hairs-breath of 0.00%….), and I can save for my next tablet.  I’m finding that I like the Kindle a lot (I’ll write about that in a future blog post) and the notion of “finding out how I work with a tablet” is definitely playing out.  I can now keep an eye on the market, and make a good decision on a good, quad-core tablet when the time comes.   Overall, it was outstanding advice, and I’m really happy with how things are working out.

The Bookstore of the Future

By Nick at January 08, 2012 15:17
Filed Under: Delphi, General, Tech Stuff, TechBiz

Bookstores are Cool

I love bookstores.  A lot of people love bookstores.  I love hanging around in a bookstore and seeing what is new, what is popular, and what is available.  I love seeing the cool games and other non-book stuff they have.   I love how most bookstores now have wireless, a café, and plenty of large cozy chairs to sit in if you want a closer look at a book. Bookstores are very cool, and I like having a good one nearby.

There are more than just superficial reasons to like bookstores.  First, they provide instant gratification.  If you want a book, you can get it immediately.  You can hold it in your hand and walk out of the store with it.  Another nice feature is the ability to browse – you can wander around, look around, and perhaps find a title that you didn’t know you wanted.  In addition, the ambience of a good bookstore is appealing and valuable as well.   The addition of café’s, music, and other products have also made bookstores much more appealing.  Clearly there is demand in the marketplace for bookstores, since whenever I go to one, there are always people there. 

Bookstores are in Trouble

But bookstores clearly are struggling.  Big player Borders recently went out of business (Anyone else notice where http://www.borders.com goes?)  Many smaller, independent vendors have been driven out of the market as well , though some of superior quality to survive (For instance, my sister loves Wild Rumpus, near her home, and they seem to be doing very well).  Online retailing has affected brick and mortar sales.  In addition, used book stores seem to have grown as well, putting market pressure on retailers of new books.  The Books-4-Less store near my house is a pretty good source of reasonably priced books, and they have a very nice selection.  They also accept “trade ins” for store credit, so you can clean out your basement and get a few new books at the same time. 

But people shopping online in the comfort of their own homes at sites like Amazon can get a much wider selection, recommendations, reviews, and all kinds of information available.  Online retailers can offer reviews, an almost infinite range of other books to “browse”, recommendations, and more.    If you know what book you want to get and aren’t feeling an urgent need to have it at this exact moment, dialing it up on Amazon’s site and ordering it with (often free) super-saver shipping can be a great time saver.  Plus, there’s non tax, and you save the gas and time of a trip.  I don’t have specific numbers, but I’m guessing that the ease of buying books online has hurt bookstore sales more than anything else.  For instance, books are always a popular gift, and the convenience of Amazon’s gift giving capabilities make giving a book as a gift vastly more convenient.  Amazon gets the book, wraps it in gift paper, and takes it to the post office for you.  Very convenient.  I’m guessing that I’m not telling you people something that you haven’t already figured out yourselves -- you are taking advantage of them in increasing numbers.

And if that isnt’ bad enough, adding to the online competition for bookstores are devices like the Amazon Kindle and other similar electronic reading devices.  Sales of Kindles and Nooks continue at a brisk pace, and every one of those represents countless book purchases that won’t be made in a bookstore.  Digital books don’t need a bookstore at all (Can you even have a bookstore of digital books?)  I know people that have Kindles who have bought many books, but haven’t held a new book in their hand in a long time – a fact good for Amazon, but not good for the brick-and-mortar retailers.  Why  even go to a bookstore?  Your friend at the local Starbucks can recommend a book and you can be reading it in just a couple of minutes – not something the owners of Borders were happy to realize. 

The Kindle is cool, but there are a few things I don’t like about it.  The top one is there isn’t any easy way to “peek ahead”.  Surely you do this – you are lying in bed reading, and you start feeling tired.  Do you just quit now, or is there a natural breaking point coming soon – a chapter ending, a sub-chapter break?  You can’t do that easily with a Kindle.  Second, (and this is why Amazon is so up on it), you pretty much have to pay for everything you want to read.  You can’t easily loan books to friends (the time limit is no fun – what to do if you have two chapters left when the time runs out?) Borrowing books from the Library has the same problem.  Amazon Prime does offer a lending service, but again, you pay for it. (See why Amazon likes the Kindle? Winking smile)  There’s a lot to like about Kindle’s, but there are a few things not to like as well.

The Current Model Costs A Lot

One of the largest struggles of the average bookstore – and the broader book industry – is costs.  The current business model is staggeringly inefficient.  Huge boxes of books – most often more books than will ever sell – are printed at a central location, loaded onto trucks and shipped to bookstores all around the country.  Those boxes are opened, and books put out on the shelves.  The rest are stored somewhere at the bookstore “in the back”.  After a while, a certain percentage – hopefully a high one, but not always – of the books are sold.  The rest are put into the “bargain bin” and sold at a discount.  Eventually, the remainders end up at those sad little bookstores at the mall or destroyed.  The costs of transporting books – they are heavy, as anyone who has moved house knows – is high.  The waste of printing books no one wants is high.  Trying to figure out the right number of books to go to the thousands of different locations – some books may be more popular in Topeka, KS than in New York City – is pretty difficult to predict.  It’s the common problem of centralize planning – who can know?

The bottom line is that the costs involved with the current bookselling/bookstore business model are simply too high.  It’s no wonder Borders went out of business – they were a day late and a dollar short with their eReader – and it’s a wonder that Barnes & Noble have kept their stores, too.

Emerging Technology

Despite the aggressive onslaught of online retailing and eReaders and very high costs, I still think there is a future – a pretty cool future -- for brick-and-mortar bookstores. However, they are going to  have to change a bit, and adapt to some new and emerging technologies.

That key emerging technology bookstores need to learn to leverage is on-demand printing.  On-demand printing is a relatively new technology, but one that can be a positive and powerful inflection point for bookstores.  On-demand printing is the ability to print a book – cover, contents, everything (even hardcovers) – immediately and on demand.  Think of it as a copy machine for books.  I’m not intimately familiar with the current technology, but I understand that it is getting to the point where a book from an on-demand printer is virtually indistinguishable from a “real” book.  Services like lulu.com and other retailers enable authors to publish any content completely unencumbered by the established publishing houses.  Because books are printed as ordered, they don’t care about volume. 

In addition, the margins on book sales are much better, and so authors can make more money – much more money – on each book sale.  Delphi authors like Marco Cantu and Bob Swart have leveraged these services to bring you high-quality content while making more money in the process.  Sweet for everyone.  On demand printing is clearly an technology that will require some adjustments to business plans throughout the bookselling business.

The Bookstore of the Future

In the future, I envision a bookstore working very similarly on the surface, but very differently behind the scenes.  Bookstores will become a retail outlet for on-demand printing. On the outside and to the casual observer, bookstores will appear to be much the same – books on shelves, cafés, calendars, music, videos, etc.  But a closer look will reveal some differences brought about by on demand printing. 

First, a bookstore will have the ability to print immediately any book.   The shelves will be full of books as now, but a customer will also be able to ask for, and get, any book in the publishing system.  This feature will help bookstores match the online retailers by allowing a book buyer to get almost anything they want.  The ability to print any book immediately will be a big feature that will enhance a bookstore’s market appeal. 

And not only will a customer be able to get any book they want, the bookstore could offer any number of customizations to a book.  Kids could get copies of the Twilight series with a selection of different covers of their favorite characters.  Readers could choose font type and size, and perhaps even different colors of paper.  Each feature could cost extra, increasing margins.  I can foresee computer kiosks at the store allowing users to pick features a la carte.   Heck, I can even foresee bookstore branded kiosks at grocery stores much like RedBox.

The second subtle change that will take place is that the books available on the shelves will consist of fewer duplicates.  Since the books are printed onsite, they don’t need to stock up on multiple copies, leaving room on the shelves for a wider variety.  This will improve the browsing experience.  And of course the store can keep the shelves fully stocked.  The point of sale system would record each sale, and a book is sold, a replacement can be immediately and automatically printed. Efficient printing and stocking would mean that the shelves would be full, and a wider variety of books would be available on the shelves almost constantly. 

And of course, the printing of books right in the store means no more distribution costs – no more centralized printing with the subsequent distribution inefficiencies. New books will be distributed electronically of course.  Book stores will still need paper, glue, ink, toner, etc., but t’s much easier and less costly to distribute supplies than it is boxes of specific books.  And the waste of printing books that never get sold will be reduced because inventory will be wider and flatter with little over-stocking.

How it Will Happen

The transition to this new model will be interesting.  I don’t think that you’ll see it come from existing chains like Barnes & Noble.  Generally, a radical, disruptive change like this needs a fresh, upstart business to challenge the existing firms.  I also suspect that existing chains are too tightly tied to the existing publishing houses to allow them to be this flexible.  And I’m pretty sure that the existing publishing houses will not embrace this new model. The music industry has been glacial in accepting and understanding the changes brought by digital music, and I suspect that the book publishing industry will have a similar reaction. 

However, I think it will eventually happen.  The current bookstore model is clearly in trouble – even Barnes & Noble is having trouble in the marketplace despite the lost of major competitor Borders.  But in the end, the demand for the things that bookstores offer is strong.  The industry will be fine once they figure out how to leverage the advantages that on-demand printing offers.

Pandora, RIAA, and Buying Music

By Nick at August 11, 2011 03:50
Filed Under: General, Tech Stuff, TechBiz

Another “reprint” from my Embarcadero blog.  Funny thing is, I was thinking of writing this exact blog post yesterday.  Right now, I’m doing something that would have seemed crazy ten years ago:  I’m listening to a wonderful personalized radio station on Pandora through my television via my Blu-Ray player.  I can honestly say that paying for Pandora was some of the best money I’ve ever spent.


I’m a huge fan of Pandora.  If you haven’t discovered it yet, Pandora is a music streaming service that has a terrific knack for playing music that you like.  You can create stations simply be telling them one of your favorite artists, and then they start playing music from that artist, and then music similar to that artist, based on the input of other users. As they choose different songs for you, you can give them the thumbs up or the thumbs down, and the  I have a great station based on the GooGooDolls, and something like 98% of the songs they play on that station I like.  After a little tuning, I only very rarely give the thumbs down to a song they play for me.

The service is free, and I will occasionally try to click on some of their ads in support of the service.  But maybe the best thing is the number of new artists that I’ve discovered.  If not for Pandora, I’d have never heard of Colby Caillat or Sara Bareilles or Matt Nathanson.  And because of Pandora, I’ve purchased many new CD’s that I otherwise would not have.  The same thing happened to Julian Bucknall when he discovered Pandora.

Now, given the above, you’d think that the music industry would be delighted with Pandora.  Sadly, the opposite is true.  They are putting the thumbscrews to Pandora.  Pandora is still on the air — I’m listening right now — and hopefully that will continue.  I’m not familiar with all the details — I gather that they may be working this out so Pandora and other broadcasters can stay "on the air".  I’m all for artists and the record companies getting paid, but it seems to me that this is another example of an "old economy" business not realizing how things work and how they can benefit from the "new economy".

A Bunch of Stuff I’d Like to See Embarcadero Do

By Nick at July 05, 2011 13:22
Filed Under: Delphi, Tech Stuff, TechBiz

There are a bunch of things that I’d like to see Embarcadero do.  I’ve listed and discussed some of them below.  I’ll probably think of more later.  Winking smile  They are in no particular order, and they are not grouped in any particular way.  They are a bit random, and range from business decisions to minor technological decisions. Where it makes sense, I’ve linked the titles to the entries on http://delphi.uservoice.com/ so that you can vote for the items if you see fit.

I’d like to see Embarcadero:

  1. Provide an Enterprise-level MVC web framework for Delphi.  This almost seems like a no brainer to me. Ruby on Rails has had a profound impact on web development and development in general.   In the .Net world, MVC has become the leading ASP.NET development method,winning over hearts and minds from WinForms.  The general idea of MVC is becoming the norm for much of the development world – separate those concerns!. Delphi’s new RTTI capabilities would actually make this kind of framework very, very possible and very, very cool.  And Delphi already has a very powerful and capable web infrastructure to build on:  good, old, and venerable WebBroker.  There are even existing frameworks out there that could be leveraged, including the G Framework.   There is a business opportunity here for Embarcadero, if not for an enterprising third-party Delphi developer.  A native, ISAPI based MVC framework in Delphi?  That would be very, very sweet.
  2. Stop trying to do other stuff and invest in Delphi.  This one has been one of my huge frustrations over the years.  Delphi is a profitable product, but no matter who owns or runs the show,  the profits always seem to get skimmed off to fund other “next big thing” projects of, well, questionable benefit at best.   Remember “SDO” taking the market by storm? Yeah, me neither. AppWave seems to be interesting and have a lot going for it, but I personally would rather have seen that effort invested back into Delphi.  I hate to think about where Delphi might be today if it hadn’t been used to fund other projects and instead been allowed to use it’s profits for it’s own development.  Delphi could use a year or two of un-distracted attention from its owner. 
  3. Create a Javascript/HTML development tool.  I’ve always said “As assembler is to the Intel chip, so Javascript is to the browser”.  James Governor has it right:  “Learning Javascript used to mean you weren't a "serious software developer". Today, not learning Javascript means the same thing.”  A powerful, feature rich RAD development tool for Javascript and JQuery would be really cool and a great new product for Embarcadero.  Maybe RADPHP could be steered in that direction?
  4. Make Dependency Injection part of the RTL: If you haven’t figured it out yet, I’m a big believer in Dependency Injection.  So much so, that I think that if you aren’t doing Dependency Injection, then you are doing it wrong.  Incorporating a DI Container into the Delphi RTL would be very cool.  Again, Generics, anonymous methods, and the new RTTI makes is very easy and powerful, and there are open source projects to leverage and build on (like my favorite, Delphi Spring).
  5. Do one thing at a time and do it really well:  This is the one that I wish they would do the most:  Take the product forward one step at a time. For instance, the next release should have as it’s main focus 64-bit Delphi and only 64-bit Delphi. That’s it.  Other improvements can be made, of course, but clearly that should be the “big one”, and it should be the only “big one”.  Don’t try to do two or three “big ones” in a single release. Make each release focused on a big, single step forward, executed thoroughly and solidly.  The product will be fine as long as it shows steady, sustained improvement.  Many large improvements executed all at once is not what the market wants.  Focus and deliberately move forward.

That’s all for now – I’ll probably have more as I think of them, but that ought to be food for thought for while

My Book

A Pithy Quote for You

"Sometimes you have to stop to sharpen the axe"    –  Peter Grumblatt

Amazon Gift Cards

General Disclaimer

The views I express here are entirely my own and not necessarily those of any other rational person or organization.  However, I strongly recommend that you agree with pretty much everything I say because, well, I'm right.  Most of the time. Except when I'm not, in which case, you shouldn't agree with me.