Tuesday, October 30, 2012

5 great iPad apps for Web Developers

I am often asked if the iPad can be used for real work. The iPad has been called a "recreational" tablet and it lacks a real productivity suite according to many detractors. Well, I don't use Microsoft Office in my day-to-day work activities so the appeal of a Surface RT like device does not appeal to me.
However, I do use an iPad because of its great connectivity features: LTE 4G, the ability to access Cisco IPSEC VPN, great remote access apps in the form of SSH, SFTP, X11, RDP, and VNC.
I use it in my data center to diagnose database servers, apache web servers, write code, fix problems in our network infrastructure. It has become part of my work tools.

Is an iPad a replacement for a laptop? It depends on what you use it for. I can attest to the great ability to quickly login remotely and fix something be it configuring a firewall, updating a MySQL database remotely, or executing a bash script. In short, it is definitely a tool in my arsenal I use for work. And quite frankly, I don't think there are much compromises.

Today, I am going to share some of those apps I use. I am going to concentrate on some great web development  apps.


I am going to concentrate on these apps:
iSSH, GustoTextastic, MySQL Mobile Database Client, and iMockups


There are many other great apps but I only want to cover 5 for brevity. In fact, one can choose other mySQL clients, mockup and diagramming apps but I wanted to show apps that take advantage of the iPad's real estate. I've seen many other apps on other platforms that are simply "blown-up" phone apps and that is not the way to go on a tablet.

iSSH

If there is only one app I have to rely on, it would be iSSH. I have used it for many years and it has saved my butt on many occasions. It is an awesome SSH client (and can even  be used as an X11 client). I've been called up in the middle of the night to reboot servers or restart dead daemon services. In short, it simply works. You can even use SSH keys. But the killer feature is the transparent keyboard and floating multi-gesture pop-up programmable cursors for use in the shell.

Like I said, if there was only one app to choose, this would be it. All I need is console access with VIM and nano and I'm set. I cannot stress how important the multi-gesture buttons are. When you are typing on a screen soft keyboard, you can quickly tab or arrow-up in an instant. It helps when you need to type really quickly in the console. For example, typing in service stop, I can quickly arrow up to repeat the command and service start. That is intuitive for someone who uses the shell and is acclimated to using arrow buttons on a keyboard.




Text Editors/IDE: Gusto & Textastic

Next, there are two text editors you should look at for the iPad. Gusto and Textastic. I originally used Textastic because it was the first text editor to support SFTP. This is important because all my servers are *NIX based (Linux/FreeBSD). Both have their strengths and weaknesses. Gusto now supports SFTP which gives it feature parity.

If you ever used Sublime 2 or themed your text editor in the Guber/Solarize themes, you will love both apps. Both can color code to make it extremely pleasant to read and edit code.

Both apps give you a full screen view and a file explorer panel view. Textastic is easier to swap views whereas the switch in Gusto is hidden in a modal dialog setting.

Here are screenshots of Gusto.




Now, the key feature Gusto has over Texstatic is the ability to organize by projects. You get visual thumbnail representations and each project are isolated from one another. In Texstatic, everything is seen in a directory view and you isolate your projects by subfolders.


Here are Texstatic screenshots:





Now, the one key killer feature that Texstatic has over Gusto is a built in Firebug option for the local preview. Firebug is pretty much essential for desktop developers. It is great to see it on a tablet.




With Firebug and a web inspector, you can analyze console javascript errors and evaluate DOM objects.

With Texstatic, you can pretty much use the iPad as a standalone device to develop HTML5/Javascript apps.
You only need access to a remote server in the case of developing Ruby/Python or PHP web apps. And the connectivity options will ensure you can connect easily to any Linux or VPS *NIX servers.
With an external keyboard, this makes the iPad an incredibly powerful and productive device.

Both apps with have their fans. Both are good at updating remote code when you need to.

For uber cross-platform geeks,  both apps are easily accessible by Linux distros. This is pretty important when compared to other devices on the market that have problems in Linux due to MTP. The iPad was pretty much plug-n-play on Ubuntu and Linux Mint. Dropping, copying, and synching files between Ubuntu and iOS 6 is a sweet.




The only thing that would both these two competing apps complete would be to include a version control mechanism. It would be awesome to have GIT capabilities in either apps.

MySQL Clients

There are countless number of good MySQL clients on the iTunes app store. I can't list them all so you need to test and try the one you like best.

MySQL Mobile Database Client is a fairly decent one that works pretty well. I often use just iSSH and access MySQL in the terminal but I understand people like GUI clients.

Once again, this apps shows the strength of iOS in terms of tablets specific apps. This app intuitively takes advantage of the screen instead of just blowing up a single column  smartphone view/layout I've seen on Android.

You can quickly select tables, view individual rows and edit them. You can also manually make queries to your heart content. I've used this apps several times when clients call me in the middle of lunch to manually over-ride or update a record.




Mockup Apps; iMockups

Lastly, there are many apps to help you visualize and markup ideas. There are dozen of great apps to allow you to flow-chart, diagram ideas. I often use TouchDraw (it was cheap) and then there some apps that go beyond flow-charting and making UML diagrams. One of those apps is iMockups.

iMockups won't make you a fancy flow-chart but it will let you quickly prototype your ideas in an interactive presentation for client approvals. This app can be used to visualize web and iOS mobile apps.

You simply drag elements of a web view and define their interaction. You can use this quickly visual a HTML form or database recordset results. Or you can design a navigation toolbar and it will actually be interactive and go to the page/slide you want to show next. I've seen many web producers use tools like Powerpoint and Keynote to do this but it ends up taking longer. With this apps, you simply drag the page elements and is actually very productive.




All these apps cost money. That is one of the major difference against other ecosystem. I am certain you can find some free equivalents. Great quality apps tend to cost money and I am more than willing to pay if it helps me. I can pretty much say many of these apps have already paid themselves off in emergencies. The ability to enjoy my lunch at a restaurant without rushing back to the office to make a SQL update is priceless. The ability to add a host deny rule using iSSH on my servers in the middle of a D-O-S (denial of service) attack is another priceless example.

There you have it. Some great apps for your recreational tablet to do some work. I will write some more  articles like this for other use cases. So the next time someone says the iPad can't be use for work, these apps can prove them wrong. These apps also show the strengths of the iPad vis-a-vis their competitors. Tablet specific and tablet design apps make a big difference.

If you do a search on the Microsoft Metro store for the Surface RT as of this writing, good luck finding a SFTP/SSH client.

Once again, the links to these apps:
iSSHGustoTextasticMySQL Mobile Database Client, and iMockups




Monday, October 29, 2012

Nexus 4 thoughts


The Nexus 4 was announced today. I went over and looked to see if it was a worthwhile upgrade from my Verizon Galaxy Nexus (I carry two phones).

Looks like it  has some great specs and the off-contract is killer. Unfortunately, there are two glaring problems:

1) NO LTE / No CDMA
2) 16GB Max storage.

  
The Galaxy Nexus is my work phone on Verizon. There would be no way my employer would let me switch. No LTE in 2012 on a flagship device is ridiculous. I have LTE on  all my devices: Galaxy Nexus, iPhone 5,  iPad 3, and my Mi-Fi. There is no way I am going back. HSPA excuses are lame and I can't believe people are justifying it online.

The storage limitation is also whack. The argument is everything should be in the cloud.
Well, I do store all my music in the cloud. I use both Google Music and Apple's iTunes Match. I have about 400GB worth of music on iTunes and probably 20GB on Google's music service.

16GB is simply not enough. Look at my current usage below. On a 32GB Nexus, I only have 3.3 left. I have already gone past the 16GB marker. On my iPhone, I am using close to 40GB with no music files on it at all. The majority of my use are photos/home videos and PDFs. I am a father and take lots of photos. I tend to keep photos/videos on my devices because I tend to edit them later on.

The new Nexus 4 is a non-starter for me. I think there are many who would probably agree with me. The Nexus 4 is definitely not a 2012 flagship device.

Screenshot of my typical usage.






Old Hackintosh turned FreeNAS backup server

I like recycling old computers. I always find a great need for things like a firewall, an intrusion inspection device,squid proxy server,etc.

However, there comes a point when it isn't worth it to use old power hungry computers. It simply isn't feasible in the day and age where you can virtualize everything. In addition to energy consumption, space is a concern. Then again, there are some old computers suited for recycling today. The one I am about to discuss is perfectly suited for the task at hand.

I have an old MSI Wind Desktop PC lying around and it is perfect. This machine was popular in 2008 due to the easy hackintosh capability. It was the PC equivalent of the Dell Mini 9 of the time. All you needed was a special USB boot image to install a vanilla retail DVD of Mac OSX. It is a low power ATOM based PC that consumed a max 35W at full load. Basically, it is a netbook in a small enclosure for two drives. It is also very compact. It is about the size of a VHS player from the 90s.



By today's standards, it is pretty much useless as a desktop computer. It has 1GB of ram and a slow cpu. Linux distros run pitifully slow. The GMA 950 gpu make it unbearably slow to run anything past Snow Leopard if you want to use it as a mac. I bought it for $130 back in 2008 and it served me well as an iTune server.

After using FreeNAS for a while, I figured a new use for this ancient relic. A daily "mirror" contingency backup server. I like to keep 3-4 backups of everything and an extra backup isn't going to hurt. I figure I'd throw this into my backup mix.

My needs was very simple - a low-powered rsync backup server and this was the ideal solution.
My PogoPlugs would work but they do not have direct SATA. Connecting drives via USB isn't ideal. Furthermore, I really like FreeNAS over manually configuring /etc files and setting up a server from scratch. Newer barebones nettops tend to concentrate on micro size with 2.5" drive bays so I excluded them.

The MSI Wind has two drive bay but most importantly, a 5.25" CD bay. This meant I could get a swappable enclosure. Instead of using a CD-ROM, I'd use that bay to shuttle drives in-and-out.
This Kingwin only cost me $18 and is completely tray-less (no screws or backs for HDD). This is pretty important because I can continually swap out drives.
Well, I have had it running for 2 months and it has been perfect. As you can see below, 60 day uptime.
FreeNAS 8.2.0 installs without a hitch. Since this machine only has 1GB of RAM, I don't use it for anything heavy duty. I store ISO disk images but mostly, it is used as a Rsync backup server for over 20 web servers. The web servers dump their web files along with daily/weekly/monthly MySQL backups. They all backup in the middle of the night and fill up whatever drive I have parked in the 5.25" remove-able bay. When the drive fills up, I simply remove it and dock a new drive in.

Since I am using FreeNAS, setting up rsync backups to another FreeNAS box is also pretty straightforward. This box also backs itself up and duplicate itself to an off-site remote "full" server. 






Overall, I am pretty happy with this set-up. My only out-of-pocket cost was the $18 remove-able drive bay. Installation was pretty much plug-n-play to a bootable USB stick. I'll run it till the day it dies. 

Some specs:

Intel® Atom™ 230 1.6GHz CPU
Atom w/ 4W thermal power.
At full operation, it consumes 35W.
2 Bays a 3.5" HDD bay and a 5" CD Bay.


Saturday, October 27, 2012

FoxConn E-350 nt-A3500 running OpenELEC

OK, I got my $110 barebone Foxconn PC and added some leftover RAM I had lying around. Since it came with a free 64GB SSD, all I needed to do was install an OS.


I elected to install OpenELEC (http://openelec.tv).

OpenELEC is a small embedded linux distro running XMBC. 
There is a specific AMD Fusion build so I installed it via USB. You can also boot off the sdcard if you are inclined to install on a leftover sd card lying around.

It works great. I plugged in a USB 3 drive formatted exFAT and played a 1080p blu-ray rip and it worked. I thought there would be stuttering but it handles h.264 just fine. I have not tried MKV but WMV, FLV and 720p AVIs play fine.


I should have ordered another one. It is so small and handy to play with.

Windows 8 metro UI on a 30 inch screen

Full screen apps look like crap on a 30" 2560x1600 display. So much wasted space.

Metro interface is definitely not designed for power user.

As you can see in the default mail application, there is so much wasted space. No wonder there isn't an Outlook version for Metro yet.
The built in news app shows white space. It looks like it is 20% content and 80% empty space. I rather read news on my smartphone. 3rd party calculator app makes it look like a blown up smartphone. Microsoft's own OneNote looks horrible.



Wednesday, October 24, 2012

Deal: Foxconn Netbox nT-A3500 Barebone

Here is a good deal not to pass up. Small net-top AMD APU E-350 barebone computer.
It is currently $120  ($110 after rebate) with 64GB OCZ Agility SSD at NewEgg.



It is the size of a few DVD cases (19 x 14cm and 2.5cm tall). It supports one 204 laptop dimm and a 2.5" laptop drive. The power draw is 14-23W (idle to playing video).

It comes with a SSD and I have a few laptop memory lying around. At $110,why not?

It is $110 after rebate today: http://goo.gl/DULcp

Slick deals thread on this.

Update: here it is.

Install a GIT server in 5-10 minutes.


Did you ever want to have your own private GitHub-like repository where you can store your code and share them with others? Well, today, I will be discussing how to install a private GIT web app that takes only a few minutes to set-up. Writing this post will take longer than running this exercise.



GITLAB is a GITHUB clone built on RoR (Ruby on Rails). It is a web application designed to allow you to host your own private GIT repositories. You can go to their website and do the full install or simply install a VM appliance. It works great for storing code. It has some basic collaborative tools like sharing guests, issuing merge and issues. This is an ideal app for a small web or smartphone-app development team.

Installing via an VM appliance is the most painless way to go. No need to install a full Linux distro and setting it up.I use Turnkey Linux and you should too. It has a large library of pre-built appliances and GITLAB is one of them I use on a day-to-day basis. I have installed over four instances of GITLAB on my ESXi server.

Today, I am going to show you how easy it is to get your own private GIT repo server up in a few minutes running just VirtualBox.

Step 1. Download ISO or OVF from Turnkey Linux.
Step 2. Create New Guest inside VirtualBox
Step 3. Install, set passwords
Step 4. Reboot.

That is it.





Ok. this post was short on specifics but if you know what you are doing, you can see it only takes a few minutes. Now, there are some things to consider and I'll elaborate and you give you a more detail set of instructions in this second part of my post.

The Detailed Setup Instructions.

This is for Mac OSX and Linux users.

The most important thing about setting up a VM appliance is deciding what sort of networking you want to use. In VirtualBox and with GitLab (or any other Linux web app), there are only two choices: Bridge-Mode or Host Only. Do not use NAT mode.

Bridge Mode will make the guest act as another computer on your network. If you have a DHCP server, it will request an get an assigned IP address. The advantage to this is that the machine is available to others on your network. Your friends and colleagues can access your GIT server as well.

Host Only mode allows the host computer and guest to see each other. Only the computer running VirtualBox will see the guest. The advantage to this is if you work offline, say camping 2 weeks at Yosemite Park without WIFI, you can access your Virtual Guest. Unfortunately, since the guest does not have outside network access, it can't do things like send email notifications and the like.

Both have their advantages and disadvantages and their use case.


The second most important thing is Hostname. You need a domain name to use GITLAB. Do not rely on IP address because it may change. If you do not have a valid DNS name (one being issued by a DNS server on your network), you can fake it by using and modifying  /etc/hosts.
This is what I do. My clients (be it OSX, Linux) only need to add an entry to the host file to see my GIT server. If you are hosting this on the Internet and have your own DNS name, this you don't need to worry about it.

In my example, I will be using localgit.local.
On my machines that need to access the GIT server, I add an entry with the IP address (either DHCP or static) and my fake DNS hostname, localgit.local



That is pretty much the only two important things you need to know.

Now for the full instructions.

After downloading the Turnkey Linux iso, you will need to create a Guest OS in VirtualBox.
Choose Linux & Debian for machine Type and version.


Specify the memory you want to use. 768MB- 1GB is enough.
Specify the disk type you want to use for the virtual harddrive. I always choose VMDK because it allows me to migrate later to VMware Vshpere if I choose to migrate my build. Your choice will be your own personal preference.


Set the drive size you want. I default to 20-60GB depending on my needs and I use Thin provisioning (or let the drive dynamically allocate/grow).

Before starting up the VM, choose the ISO disk image to boot from

Next Step. Boot the VM and go through the install process.




A few notes. It will ask you how to partition the Virtual Drive. This is your call and preference. I use the second option, Guided, because it is quick. I prefer not to use LVM in the event I want to mount this virtual drive from another Virtual guest that doesn't support Linux LVM. It will guide you through the process, install the bootloader and reboot one more time before you can use it.






After the VM restarts, you can disconnect the .iSO disk image. This next process is a series of prompts from Turnkey for passwords and set-up.

You will be ask to enter

  • root password
  • mysql password
  • password for admin account (to access web site)
  • email address for admin account




Finally, you will be asked to enter the hostname/dns name for the GITLAB server. This is it.




Once finished, you will be shown a menu where you can view administrative links, change IP, reboot, etc. This concludes the installation of GITLAB.

Post Install.

If you are reading this, I assume you know the basics of GIT and how to connect to remote GIT repos.
It will be the same here, you will need to set up SSH keys. GITLAB's web interface allows you to copy-n-paste into the web browser which simply things. Some GIT apps don't even require you to generate SSH keys and generate unique ones within their respective apps.






Creating Repos.
You can migrate existing repos from your local machine and push them to GITLAB or create a new blank empty one within the web app.




As you can see here below, I can see my source code and view changes within the GITLab web interface.



It works surprisingly well with various GIT client's I've been using: SourceTree,GitBox on Mac OSX, Git-Cola, Giggle,GitG, and SmartGIT on Linux.



Some Links: