Broadband not keeping up with computing and storage?


This graph presented by Google paints a sorry picture for broadband. Innovation seems all to have stopped. Read the article. Go for it Google!

Advertisements

Falling out of love with the iPhone?


…not so soon.

The Falling out of love with my iPhone post by iDean should be a wake up call for Apple. Then again, we are probably basing our conclusions on speculations and rumors.

I just climbed on to the iPhone bandwagon, so no falling out of love for me just yet. I do agree that the next iPhone shouldn’t just be bigger and thinner. It should be revolutionary, or I’ll just stay with 4S. It meets my objectives, I am sold into the iOS ecosystem, music, apps, Airplay… you name it. It probably would keep eating the competition if Apple dissed the rumors and said there’s no new iPhone around the corner, and reduced the price just a notch.

The competition always will catch up and change the game. Ask Nokia and RIM about it. Apple cannot make that easy. Change for change’s sake is such a bad idea, Apple should knows that. The new dock connector (if rumor is to be believed), the Nano SIM, and who knows what else, are such changes. The arrival of the next iPhone could justify them all, but those who are studying these rumors may just find the competition more attractive right now.

Some other things I have learnt about programming


Inspired by and adding to the post by John Graham-Cumming on programming, I add a few of my own lessons learned.

1. Programming pays for your bread and butter

Those who pay you will want things from you in return.

You may be given impossible deadlines. Don’t let the pressure get to you, get things done. Don’t compromise on quality. Learn to say NO without burning bridges.

You may have to argue about requirements, software design, graphic design, usability, and other ities. You’ll have to defend your position, but it pays to be humble, listen or ask twice and speak once.

2. Know your Licenses

You’ll have to know not to mix GPL/LGPL code with proprietary code. You’ll need to know the subtle differences between GPL and LGPL, GPL V2 and V3, MIT and BSD. You’ll need to know what license that piece of code or component you’re borrowing from the internet uses.

3. Support and maintenance

Not everything on your plate will be new and shiny. You’ll have to fix problems in your code, fix problems caused by your code.

4. Give back

You’ll learn a lot from others. Deadlines will make you selfish, you’ll forget to give back. Make it a habit. Maintain a blog. Follow blogs of others. Help people with questions. Contribute bug reports and bug-fixes to community code.

Instant Carpool


Instant Carpool (aka instapool) is my stealth startup. Oops, not so stealth any more. I am revealing it so that the idea catches, and before long, all cities have such a service. Its aim is to let everyone carpool, whether they are first-time, occasional or every-day travelers in a city.

Source: Wikipedia

Carpool Stops

The service provides stops along the roads, just like bus stops, only better maintained. Legislation permitting, stops show ads at prominent locations, and provide services for busy people to buy stuff over the internet. They also provide cheap Wi-Fi access. They are maintained using earnings from services and ads, and donations from philanthropists.

Signs

Hitchers can borrow signs at the stops to show their destination to passing cars. The signs themselves are ad-enabled.

IOU Card/Token

The hitcher can buy an IOU card/token, over the internet, using a PC or Smartphone. Hitcher gives car owner a token written on a piece of paper, by bumping Smartphone, or using plastic. Car owner can cash the tokens for real money, or use them for rides.

Instant Carpool keeps 30% of the face value, and the tokens are priced at around bus fare rates. They are also sold at resellers in plastic, and resellers keep 10%.

I don’t want this idea to go beyond half a printed page, so I’ll stop at this point. If you like the startup, share this post like hell. May God bless your over-crowded city.

Embedding the Browser


This post discusses different options to embed the web browser into an app, on different platforms.

Most applications can benefit from using HTML for the User Interface (UI). HTML has evolved to a point where it is easier to make better UI using it, than using native UI toolkits. The UI is also much more portable, if you need to support different form factors and platforms.

Portability is achieved using JavaScript and CSS, but you have to take browser-specific nuances into account. Several open source JavaScript UI libraries have evolved over the past years, such as Bootstrap, Dojo ToolkitExt JS (GPL), and JQuery UI, that ease the pain of cross-browser UI development. There is also a plethora of open source and commercial cross-platform toolkits that leverage HTML5, such as Appcelerator TitaniumPhoneGap, Rhodes, and Sencha Touch (GPL).

The limitations of such an approach is performance, but even that is slowly ceasing to be a problem as browsers gain from hardware acceleration. Another drawback is lack of proper tools for editing, debugging and profiling. Fortunately, browsers such as Chrome and FireFox now have good built-in tools or extensions that can be of help. IDE support is also constantly evolving with features such as code completion, JavaScript debugging, refactoring, and static code analysis.

Windows desktop

On the desktop, if you are a .NET programmer you can use the WebBrowser class. The benefit of that class is its ease of use, but the drawback is that the browser is essentially Internet Explorer (IE). IE is not known to have stellar support for evolving web standards. One particular problem I faced was the browser control not applying print media CSS correctly.

There is further effort from the open source community to provide browser controls based on ChromiumGecko, and WebKit that may have better standards support.

The advantage of using the WebBrowser class is that you can use its ObjectForScripting property to set an object that can be accessed from JavaScript using the window.external object. You can encapsulate this proprietary mechanism behind a JavaScript class/interface for better portability, and switch to another implementation on a different platform.

Java

The Java platform has a javax.swing.JEditorPane component that can be used to show and edit HTML, but it is not a viable alternative for modern web user interface development. A more modern cross-platform alternative may be the javafx.scene.web.WebEngine component.

Some may find Eclipse SWT’s org.eclipse.swt.browser.Browser to be a better alternative as it embeds the default browser of the OS e.g. Internet Explorer on Windows.

Android

Embedding the browser in Android and iOS is a breeze. If you are developing an Android app in Java, the WebView class in Android can be used to embed the browser. If you are a .NET programmer and have adopted Mono for Android, you can use a similar class from their .NET wrapper API for Android. It is possible for your JavaScript code to call Java or .NET code by injecting an object using the addJavascriptInterface method of WebView. Form submissions can also be intercepted by creating and setting a WebViewClient subclass.

The Android browser is not known to have good performance, especially for JavaScript. The plethora of Android devices with low-end specs also does not contribute to good performance from the browser.

iOS

You can embed the browser in an iOS app using the UIWebView class. JavaScript code can be called using the stringByEvaluatingJavaScriptFromString method, but JavaScript cannot call Objective C code. You can always embed a web server in your app, that the UI can call.

JetBrains WebStorm


After a hiatus of almost eight years I have returned to doing development of HTML apps. The first thing I started searching for is a decent IDE. My search revealed Visual Studio .NET 2010, which I already had installed, JetBrains WebStorm 4, which I am now evaluating, and Aptana Studio 3, a free alternative.

Visual Studio .NET 2010 does have nice HTML WYSIWYG editing and CSS support, but you quickly realize that it has less than stellar support for code editing. Compared to code editing capabilities for .NET languages, the editor for HTML and JavaScript is poor.

Aptana Studio 3 is awesome for its price. It has a nice code editor with syntax highlighting and auto-completion. It tends to freeze occasionally when certain features are loaded for the first time, but is otherwise quite responsive.

None of the these compare to the joy that is WebStorm. I’ll quickly high-light what I like about it.

  1. You can create projects, but can just as well point to the root folder of your HTML code and are good to go. Couldn’t be simpler. It supports commonly used version control repositories, including SVN and Git.
  2. Auto-completion in HTML, JavaScript and CSS works really well. HTML auto-completion even works in JavaScript strings.
  3. Quickly find (control+click) where a CSS style or JavaScript function is defined, and used (Alt+F7). Really nice to gain a big picture understanding of a (rather messy) code base. Jump to files using the same method.
  4. Refactor (rename, move, delete…) files, class names, JavaScript functions and so on. Really nice for making sweeping changes with ease. I did encounter a few rough edges. For instance, I found it impossible to rename a class when multiple class names are specified e.g.
    
    <div class="class1 class2">
    
    
  5. Code analysis points out errors and possible solutions. It even has a built-in spellchecker.
  6. Unit test and debug JavaScript step-by-step in Chrome or FireFox.
  7. Fast and responsive, I have yet to have it freeze on me.

Check out their features page for other neat things it can do. I have yet to think of what I don’t like about WebStorm.

Don’t have the money to spend on a personal license, and your company will not sponsor a license? You can get a much reduced set of features with the IntelliJ IDEA Community Edition, a nice free IDE for anything Java, including Android.