RSS

Monthly Archives: March 2012

Why is Mozilla investing in Rust?

A very long time ago I was having a conversation with peers that spilled into a blog post. At the time I was noticing that all of the big boys like Google, Yahoo and others were gobbling up language gurus like Guido.

Now, in hindsight, Mozilla is creating Rust. I do not pretend to know what their real motives are but I do find it interesting to observe. Mozilla’s history is all over the map. It was commercial, then it was open source and non-profit, then it was commercial again under AOL and then it was open-source and semi-nonprofit as the Mozilla Foundation… or something like that.

It just seems curious to me that they would go this route. They have 3 or 4 successful projects. They have uber cool tools that are functionally cross platform. I don’t think they do any pure or applied research in languages to this point in time. Why Rust?

Google’s GO fills a need and they are clearly going to direct the future of the language. Unlike the days of the IBM and Microsoft – OS/2 and Windows wars or the days of Lotus and Excel… There is no API war to be won. Rust could be a fork of GO and it would not matter in the least as it once did.

It seems to me that DSL(domain specific language) is actually being replaced with BSL(brand specific language) and everyone wants to get into the act.

 
Leave a comment

Posted by on 2012/03/31 in business, ProgLang, Tools

 

Tags: , , ,

Programming Challenges are “de-motivational”

I think the title of this article give away the ending. Sorry… I suppose you can stop reading here.

Thank you for reading on… I recently applied for a programming position. In the initial response email from the hiring manager or HR I received a response like:

… and then there is the programming challenge … and it should take 2 days.

Really? Are you kidding? You want me to give up 2 days for what? That was my unfiltered subconscience speaking. But really, that’s a lot to ask. Specially when someone is going to take my 2 days of work and skim it for some quasi critical check boxes and make a summary evaluation.

So I said no.

As for the programming challenge. With over 25 years of practical experience and interviewing on both sides of the fence… I do not do programming challenges if I can help it. They are (a) subjective (b) generally insulting (c) trumpeted by junior silicon valley programmers (d) perpetuated by myth (e) and a sign of lazy managers.

I’ve written about this sort of thing before and I think this summarized the many articles. But this morning I had one of those inspirational moments.

I recently started reading The Developers CodeI’m only part way through the book but I have started to connect with the author. Reading an essay at a time as my toddlers crawled around the living room playing with their toys… I made it into the “Motivation” section.

Having pets in the office was a necessity when you work 10 to 16 hours a day, however, I have to admit that I never liked ping pong, darts or pool table in the place of business. And this is where I fork into two equally important thoughts.

(a) these so called “perks” require more than one person to be stimulating. In one workplace I visited all of the workspace wall are glass so if you are playing ping pong instead of your job (1) everyone sees (2) it requires two. Both have a demotivating effect on team members trying to get work done while others are at play.

(b) the “perk” of our career path is supposed to be the work. I happen to like transactions and databases. Luckily for me there is plenty of work in this space as most applications today are built this way. But the work is it’s own reward.

So when you ask me to take 2 days of my life to work on something that is not going to yield any appreciable results… there is simply no motivation to do the work. It also speaks to the nature of the organization.

As an aside, some programmers like to talk about code as art or science. The field might actually be divided on this note. I do not think it’s either. but that’s fodder for another article.

 
3 Comments

Posted by on 2012/03/30 in business, for hire, management

 

Tags: , , ,

tmux is better than webex

Many of my clients use webex, go-to-meeting or one of those desktop presentation programs in order to share a desktop and get some work done. They are really nice when you have display slides, GUIs, and sometimes videos. About the only problem with the scenario is that it take plenty of bandwidth for just a terminal session… along with the audio.

I’m new to tmux, however, I’ve used GNU Screen for years. Screen has the ability to share a terminal session but it’s not very friendly or easy when compared to tmux. The PragProg book has some nice recipes for tmux and is worth checking out.

Using tmux for paired programming (not a favorite) is easy. And tmux is specially nice that it let’s one or both users to work in the session but you also get to do other things if you want to be in readonly mode. tmux is installed by default on any OpenBSD installation … I think it’s a tool you can trust. Also, iTerm2 had some plug-ins for tmux but that requires a custom version.

 
Leave a comment

Posted by on 2012/03/29 in Tools

 

Tags: , , , , ,

“Unfortunately, we’ll reject most software developer job applications.”

Andrew Stuart of Supercoders in Australia made the bold statement that is the title of this response. While I understand the point he is trying to make he has selected an example that demonstrates that he does not get “it”.

He insists, in his article, that potential employees know the [parochial] definition of private, protected, public, abstract class and interface.

There was a time when I knew the definitions word for word. The GOF were also a part of my indelible memory… but as time progressed and as open source took a foothold idioms like protected and private meant less and less.

Back in the day when library vendors were distributing binary-only files private and protected meant something. It meant that the vendor could hide the implementation details. This was usually necessary when there was some intellectual property in play. It’s simply not the case any more.

Going back to Andrew’s comments. I don’t know many a-list developers, programmers, architects – that rely on wrote memory. Good luck to you Andrew.

 
Leave a comment

Posted by on 2012/03/27 in for hire, response

 

Little Snitch – Network Monitoring

One of the really neat features of Little Snitch(LS) is that it has a small dashboard that indicates the network i/o for a particular destination. There is a console version of that feature for the Linux set called iftop (there is a version for OSX too). But as I sit here considering LS I’m thinking that it was good in it’s time be that is not the case right now.

LS has a “rules” engine where you specify the application and what remote systems it can connect to. But as I look at the rules they are all enabled. So what benefit is it?

In order to install the OSX version it’s best to have already installed MacPorts. Then install iftop.

sudo port install iftop

(clearly you need root/admin access to your OSX system).

Once you have iftop installed you can launch it with:

sudo iftop

You need root access because intercepting the network packets requires root access.

 
Leave a comment

Posted by on 2012/03/25 in Tools

 

Tags: , ,

GO’s missing feature fulfilled

I really like the GO language, however, I’ve had a couple of complaints that prevent me from using it in production. (a) the language has been a moving target and it seems that the 3rd party library developers have lost whatever momentum they had. (b) the absence of a version manager like RVM for Ruby or VirtualEnv for Python.

Well we cannot do anything about (a) because it’s as much political and emotional as it is technical and cost. But having (b) in our back pocket makes development so much easier(GVM – go version manager). I think once it makes it into the mainstream of GO development more real progress is going to be made.

Go offers a nice balance between perl, python, ruby, java, erlang, lisp and a few others. With it’s memory management, sockets, IPC, datatypes, compiled, formated, syntax… it’s just a nice balance.

 
Leave a comment

Posted by on 2012/03/25 in ProgLang, Tools

 

Tags: , , ,

Where are my machines? (nmap)

I do odd jobs from my home office. It’s not much but it supports my hobbies. Recently I was handed a POS and asked to configure it/integrate a new PinPad from a vendor that was not already supported.

The first task was to login. It was a linux based system with an ethernet port and ssh-server running. When the machine boots up it calls for an IP address from the local DHCP server. In my case the DHCP is served by my firewall. Depending on the type of software running on the DHCP server sometimes they list the IP address leases. This one did not.

nmap is a tool used to locate hosts and open ports. It has a number of good and bad uses.

The first step is to install nmap. This is simple on most Linux distros. Since the system I’m on is OSX I had an extra step. Assuming that I already macports already installed.

sudo port install nmap

Once the installation was completed I needed to execute the search.

nmap -v -p22 10.0.1.2-200

“-v” is the option for verbose

“-p22″ is the setting to search for port 22 on each IP address. (port 22 is the ssh server port in most configurations)

“10.0.1.2-200″ tells nmap to search the 199 IP address from 10.0.1.2 thru 10.0.1.200… for example: 10.0.1.2, 10.0.1.3, 10.0.1.4 … and so on.

I got my list of devices and since it was a short list it was easy enough to try each.

Initiating Connect Scan at 19:10
Scanning 10 hosts [1 port/host]
Discovered open port 22/tcp on 10.0.1.27
Discovered open port 22/tcp on 10.0.1.21
Completed Connect Scan at 19:10, 0.20s elapsed (10 total ports)
Nmap scan report for 10.0.1.5
Host is up (0.19s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.20
Host is up (0.023s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.21
Host is up (0.0028s latency).
PORT STATE SERVICE
22/tcp open ssh

Nmap scan report for 10.0.1.22
Host is up (0.0061s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.23
Host is up (0.00027s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.24
Host is up (0.0028s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.25
Host is up (0.20s latency).
PORT STATE SERVICE
22/tcp closed ssh

Nmap scan report for 10.0.1.27
Host is up (0.0025s latency).
PORT STATE SERVICE
22/tcp open ssh

Nmap scan report for 10.0.1.28
Host is up (0.0063s latency).
PORT STATE SERVICE
22/tcp filtered ssh

Nmap scan report for 10.0.1.29
Host is up (0.0062s latency).
PORT STATE SERVICE
22/tcp filtered ssh

Read data files from: /opt/local/share/nmap
Nmap done: 199 IP addresses (10 hosts up) scanned in 20.18 seconds

 
Leave a comment

Posted by on 2012/03/23 in for hire, Tools

 

Tags: , ,

What is so interesting about the Flask microframework?

I get that Flask has a lot of the same design patterns that Ruby’s Sinatra has. I suppose if one used a metadata approach to application construction/deployment that you might be able to basically interchange between them.

I did a search hoping to find out the differences between Flask and Tornado. I was rewarded with a page from the the Flask development doc. The contributor was suggesting that one might link or cascade Flask with either Tornado, Gevent, Gunicorn or some other proxy setup.

While mentioning Tornado the contributor says…

Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. Because it is non-blocking and uses epoll, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. Integrating this service with Flask is a trivial task:

In the deployment section of the doc Flask makes is clear that the built-in webserver is strictly for development. The reasons are probably very similar to Rails’ webrick but in the case of Flask there are no explanations. Nor is there a recommendation just a list of servers.

I recently deployed a Tornado-ZeroMQ bridge in order to increase the transaction throughput. Sitting in front of the Tornado instance is a traditional webserver like apache, lighttpd, nginx. These webservers are serving static content because that is what they do best and the dynamic requests are passed thru. But why would I deploy lighttpd->tornadoweb->flask? There is plenty of room for improvement here but someone transitioning from sinatra to/from flask could be rewarded.

hello world from their respective websites:
(Flask)

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
  return "Hello World!"

if __name__ == "__main__":
 app.run()

(Sinatra)

require 'sinatra' 
get '/hi' do 
  "Hello World!" 
end
 
Leave a comment

Posted by on 2012/03/22 in Tools, web

 

Tags: , , , , , , , , , ,

Programmer DNA in your code – “In Plain Sight”

In a recent “In Plain Sight” episode the writers tried to suggest that the bad guys, given enough CPU cycles, could identify and geographically locate an individual programmer based on his code’s DNA.

Seriously?

I implemented some algorithms as an undergrad that could compare two documents and determine the likelihood of plagiarism. But in this case (a) the english language (b) comparing two known documents.

I would like to think that I’m not the only one that realizes that the potential for matching two snippets or even complete source trees is as unlikely as proving program “correctness”. (when I was an undergrad that proof could not be completed)

First of all the number of syntax permutations is infinite. The problems they solve are equally as large. Variable name substitution does not count, and with applications like gofmt and IDEs that reformat and inject comments… one is more likely to identify the IDE and not the programmer.

 
Leave a comment

Posted by on 2012/03/21 in Tools

 

Tower App Missed the Runway – BitBucket

I like Tower. It’s a strong GUI in front of a DVCS that can be hard to manage if you’re not completely versed in it’s execution. Even with quality books from PragProg it’s still a challenge. So Tower is welcome.

This week they announced support for BitBucket. BitBucket is a DVCS based on Mercurial instead of Git. (BitBucket does have a Git option when creating repositories.) So when the announcement was made I was pretty excited.

I use both GitHub and BitBucket. GH is perfect for my public projects and BB is perfect for my private projects.  It’s all about the cost.

Naturally I was excited when they mentioned the BB support. I thought… one tool, two repos.

But that is not the case. There is little or no documentation on this feature. The “manage repositories” is very unclear and the behavior seems to be adaptive. To what, I do not know. The one thing that is missing is a statement like:

While we have support for BitBucket, we are still limited to Git repositories.

That would make a lot more sense.  I’m not certain that I would convert my repos to Git because I happen to like mercurial better… and for no particular reason other than the fact that as a tool it is implemented in a single language unlike Git which uses several. This has the potential, and has in the past, failed to build when versioning goes bad.

Oh well, maybe later.

 
Leave a comment

Posted by on 2012/03/21 in Tools

 

Tags: , , , ,

 
One Page Docs

Creating a library one page at a time.

One Page Bugs

Reducing the friction of writing and fixing bugs or features.

Follow

Get every new post delivered to your Inbox.

Join 223 other followers