Skip to main content


Showing posts from June, 2012

BitBucket vs GitHub

I tell you... what a hard decision to make! I cannot decide which tool is better for my DVCS needs. Clearly the toolset is deeper if I go with GitHub. Not only does GH have lots of tools but there are plenty of 3rd party tools too. Some of the slicker GUIs include Tower for OSX. On the downside; if you have to install the CLI client it can get squirrely  because there are a few different languages in the dependency tree although I've never actually had a problem deploying it.

On the other hand, the pricing for BitBucket is better when you consider my shop. I'm "mostly" a sole contributor for my company and having an unlimited number of private and public repositories is reasonable and cost effective. The other thing I really like is that the CLI is written in python and mostly python.  I think there is some native C code that compiles but I cannot be sure. I know that it installs in a ver stable fashion.

As for which has better. I'm not certain. I know that they ar…

What is middle management good for?

Rosabeth Moss Kanter recently wrote an article for the Harvard Business Review. She has a number of views on the subject of management hierarchy and I think she misses the point. In response...

First of all, as an example, middle management is where executives and upper management get to take off their training wheels. There is a reason why Donald Trump has an apprentice program and not just the TV show. There is a reason why government does pretty much the same. I would not expect some undergrad with a polisci degree to run the country. Without middle management the revolving door at Yahoo and HP would become a game of chutes and ladders. (The last thing I want to see is all upper management graduating with Harvard MBA and no job experience)

Second, it's not the first time that corporate america has ejected middle management in the last 30 years. The last time was because of the recession/depression or whatever it was. This covered manufacturing and technology companies. And in the…

Why is middle management on the decline again?

I really hate this subject because it effects me directly. Back when Reagan was President we had a huge recession. As a result middle management was all but obliterated from the middle corporate America as management thought this was the way to survive. And we learned two important lessons from this reaction. (1) recession almost turned into depression and corporate America was almost erased (2) many middle managers spawned successful startup businesses. (the two are not offsetting even with the dot com boom and bust)

Now, it seems, that we are in economic hard times again and whether it's a recession or depression is for future economists, however, I do know that middle management is being erased again; and top managers are calling it lean or agile. As a result the execs are making more money (as part of their "incentive" packages) and entry level positions have become highly competitive as the job market shrinks without rational stimulation. I wish that it was a fair co…

My wishes for Apple and iOS

I have been thinking about the number of PCs that I have recycled and the number that need to be recycled. And then I think about my toddlers that could benefit from a computer but are clearly not ready for anything that looks like Windows or OSX. But what is amazing is that have just about mastered iOS. They can play games, recognize and switch games by their icons, view pictures and navigate the albums.

So here's my wish. I want to recycle my old PCs by installing iOS on it so that my kids have something to play with. I just don't see myself buying them a $750 iPad at the age of two and the iPad that I'm using is not ready to be recycled nor do I have more than one iPad that hand-me-downs are an option.

Vizio is on the move

[Update 2012-06-26] Vizio just announced "CoStar". It's a GoogleTV appliance that costs $99USD and has all of the basic features like video and radio from the various media suppliers. The price for the device is inline with AppleTV now it's a matter of comparing the cost of the media.

It's been a news story recently. Vizio, an American company and maker of reasonably priced TVs, is branching into making computers. Their laptops and all-in-one desktops are aesthetically designed with plenty of "out of the box supported" modern features(no custom device drivers) and none of the sponsor-ware. Which leads me to a number of concerns:

(1) Is the $899 starting price tag really the best price? If you look at the TV market and compare; Vizio was never at the utter bottom but their prices and quality make them onto any gift-list I imagine. However, the price is closer to Sony and Lenovo instead of Gateway and eMachines. I would like to get a hands on to see it in a…

Freelance IT / Programmer Consumerism

A few days ago I came across this article and as I ponder some of the projects I'm working on, clients and missed opportunities I've realized a few and important facts.

Every SOHO and small to medium business out there depends on computers and software just as much as they depend on electricity and the dial tone. So it's a wonder to me why many of these businesses do not hire companies like DockYard. Not to implement some critical or non-critical application at $120 - $250/hr or $4,000 - $7,000/wk or more. But as a resource to make sure that the High School kid, summer intern, or college CS major does a good job or gets a solid background or framework to begin with.

I'm not trying to take jobs away from this cadre of would-be future Zucks; I'm trying to say that you, as a business owner depend on your systems and applications to keep your operating costs down and your productivity up. So when your systems are buggy, damaged, or down you're losing money through fa…

Sandboxing OSX apps is a good start

The idea of sandboxing OSX apps is not new or unique. Both OSX and Windows have features that prevent software, particularly 3rd party apps, from accessing various physical and data resources but it's not without it's detractors most of which are just haters. What bothers me is that many in this verbal minority have an agenda whether it's selling more anti-virus services or their one of those users that does not care.

The reality is, however, system or computer security whether it's in the form of in-built firewalls, Little Snitch, or sandboxing has more to do with protecting the brand rather than user's data. One other side effect is going to be the cost of support.

(1) the first thing you'll notice whether you're installing software using the appstore or downloading directly from the vendor's website is that the app is being installed as a "shared" app which means that the user needed to be the administrator or have administrator access. And s…

Assertions in Java and Go

First and foremost assertions do not exist in Go at all. The language designers had a very specific opinion about it. On the Java side assert was converted to a keyword. This too is interesting and yet maybe not so much.

When servers/daemons are designed in the erlang way where failure is an option then things like assertions are ok. The application will crash, possibly generate a core file, definitely generate a log entry, and then restart. It could be the best of all worlds, especially when you have certain expectations.

Here's the thing. Unlike the Python and erlang idioms java is strongly typed so it almost makes sense to test input ranges etc and throw exceptions when things go bad. Assertions on the other hand do pretty much the same thing by setting the expectation during development and testing. The idea that the java language designers had was that assertions cost time and space; and if assertions can be removed from production then speed and size are recouped. However, dur…

It's never really the __END__ in Perl

One of the really neat constructs of Perl is the __END__ token. I do not know the origin, genus or species of this token but I like it. Back in the day when I was a contractor at IBM I was handed the tomb called ISO-9001. I don't remember much of it anymore other than one or two facts.

(1) every page that is numbered needs to be numbered thus:  "1 of 10". The reason for numbering the document this way was to insure that the reader would know when they reached the end of the document.

(2) similarly the author was required to identify when the reader had reached the end of the document. I do not remember what the ISO token was for the end of the document but over the years I have adopted "# # #".

It's because of these rules that I have, out of habit or some deep seeded need to conform, that I always put some sort of tag at the end of every source file to indicate the EOF. And since Perl has this tag already defined... and with the exception of COBOL and maybe Fo…

N-way file merge Perl, Python, Go and Lua [Java, Ruby]- Compared

[Update 2012-06-22] Here is the java version of this assignment. It is/was awful. Once you stray from OO, in java, the code inflates like a sea monkey and clearly OO is over the top overkill.

[Update 2012-06-22] Here is the Ruby version of this assignment. I like it's compactness although that came at a steep price as accessing hash elements meant clunky dereferencing and string comparisons were just awful. [That was an error on my part; works as you'd expect]

Not to beat a dead horse but I now have 4 example implementations in Perl, Python, Go, and Lua.

I did my complaining about Lua in a previous article, however, in summary here... this example in Lua is verbose and lacks consistency. I'm not expecting to reduce this to a single LOC (line of code) but I would have liked some additional APIs that would have implemented more efficient algorithms based on internals knowledge. Or at least well documented idioms.

The Go example was fun because the version 1.x of the toolset was …

Things I hate about Lua!

A few days ago I was given a programming assignment. It was pretty simple. In fact it was so simple that I still cannot decide whether the challenge is whether I could follow instructions or whether I could see deeply enough into the assignment to find all of the traps... or were those traps meant for discussions later or was the whole thing there to determine if I knew enough Perl idioms to be a viable candidate.

So now that the assignment is complete and submitted I decided to implement the assignment in GO and Lua. I might even do a python and Ruby version but not right now. Maybe tomorrow.
The assignment: Write a program that could take as input any number of files that are presorted and merge the input file(s) preserving the sort order and keeping the amount of memory usage to a minimum. And you cannot use external shell commands.
That was pretty much it. The assignment missed a number of issues:

(1) what do do when no files are provided

(2) what to do when 1 file is provided (presuma…

Compare table length in Perl and Lua

In the beginning there Perl; and in Perl was the array and the hash. Later there was Lua; and in Lua there is the table. The table in Lua seems to be both an array and hash, where they are both implemented as a hash. But let's start with Perl.

In Perl (don't panic there are idioms that make this less straight forward):

[sourcecode language="perl"]
# length of an array
my @a = (4,5,6);
print scalar @a; #-- prints 3

# length of a hash
my %h = (four=>4, five=>5, six=>6);
print scalar keys %h; #-- prints 3

In the array example I'm thinking that the number of elements in the array is actually stored in the array and that the function of converting the array to a scalar causes Perl to return the stored value. I really hate the idea that Perl might be counting every element in the array every time this was performed... and if it was then that might justify storing the length locally for the different uses although this get's funky when multi-thread…

Ruby Contracts Gem - Contradiction?

I continue to buzz Ruby like an Army Combat Drone. Recently I captured a post that caught my attention. The basic idea is:
The addition of decorators to Ruby methods so that params and return values were of a particular type.
To my knowledge the absence of a "contract" is actually a strength of Ruby, Python and Perl. In fact Python specifically recommends that one should not check the param types and that throwing some sort of type exception is preferred. (it in one of the best practices docs).

The only reason I can fathom for this "Contracts" gem is so that programmers coming from strongly typed languages (java, c, c++) can transition easier. The only problem is that there is no place for this sort of coding when on a team of experienced programmers in that particular language. The establishment is going to have it's way of doing things and it will be on the new guy to assimilate.

Here is a perl edge case:

[sourcecode language="perl"]
sub add($$) {
    my (…

advert-ware reinvented - no free lunch

It used to be that when you bought your new PC (specially from IBM) or Mac that you received the hardware and the base operating system. Nothing more.

Then some slick marketing guys realized that they could subsidize cheap hardware by installing would-be free-ware or later adware and then it got so bad (Packard Bell and eMachine) that they were installing 100s of apps leaving little room or overhead for your own apps. Many of the apps could not be removed. And when you did a fresh install of white label MS Windows there was always some driver that was missing.

In recent years a very similar thing has been happening in the browser market.  Many of the browsers manufacturers get paid for directing your search queries to one search engine or another. The fact that some browsers give you a choice of search engines is not FREE. They are getting paid by all of them or there would be no incentive. (I have yet to see duckduckgo installed on Chrome)

A few months ago I was impressed that twitter w…

MsgPack vs JSON - size vs readable

MsgPack as an RPC with integrated cross platform compressed payload is useful and interesting. However when you strictly consider JSON's format to MsgPack's format it's all about JSON.

One thing we already know about compression is that plaintext ZIPs to about 50% compression and that binary does not compress very well at all. So compressing a JSON payload will yield some coos compression where MsgPack will not and therefore we need to compare it's native format.

And after all that I/we can read or write JSON documents easily by hand.

Liability Insurance for the Freelance IT Professional

If you ask an attorney, corporate counsel or your insurance agent I'm certain that the answer would be the same. YES, you need insurance! And I suppose from a strictly paranoia or disaster point of view that's true, however, what about the other 99% of the time.

In the most fundamental projects, regardless of complexity or risk, there is an acceptance phase where the client takes ownership and responsibility of the work product and it's benefit. And so the risk transfers or should transfer to the client upon acceptance. So then what is the purpose of the Liability Insurance?

In reality, contractors are not charging enough. If they were then it's likely that more companies would hire full-time resources instead of contractors or consultants except in the most extreme or specialized vertical knowledge.

integration, convergence, happy desktop - what's next?

I'm banging away on my development system; installing Fedora-17 and VMware tools for kicks, watching some YouTube, and skimming some emails, reconfiguring iChat, iCal, Skype, MailApp and Sparrow; and thinking about what would make a real productive desktop. Windows, Mac, Linux, *BSD, console-mode, proprietary GUI, X-Windows, is there a cloud or virtual platform that makes sense, what about ChromeOS, ChromeBook?

There are just so many brands, platforms, tools, development environments, and purpose built tools that it's almost impossible to be a user and a developer at the same time.

As a user, project manager, and business person; I need access to word processors, spreadsheets, accounting software, some purpose built applications for reporting, IM.

As an architect, developer, testing; I need access to the command line, the necessary desktop development tools like IDEs, access to various databases, remote systems, IRC.

The list goes on and on, but the truth is that there is no o…

Another tech question

Given a set of weighted values what combination(s) equal 10?
I coded this latest challenge here. It's fairly concise and it implements the challenge fairly cleanly with a few loose ends. For example I do not like the use of a global counter '$i'. I'm also bugged by tokens with a value of 0 (zero). But it's a start.

[Update 2012-06-04] Just to be clear my concern with the code I presented was that the reduce() function had external side effects. And that's just yukky code.  I've updated the code with this and I like it because it eliminates the side effects entirely but it meant having to install List::MoreUtils.

[Update 2012-06-05] I forgot to mention that I had initially tried to code the sample in python, however, I was not able to get a BigInt-like class installed. I did not try very hard but hard enough. Perl's was there by default or simple install and while I did not implement the code in Ruby; it [Ruby] has a BigNum implementation so a direct transl…

Monte Hall Paradox

[Updated 2012-06-04] I added a Perl version of the same function.

I was recently taking part in a technical interview when the interviewer provided me with the Monte Hall. This is nothing like The Full Monty. It is something completely different. I started to solve the problem using a random DSL of my choosing... which turned out to be something akin to pseudocode or maybe more like detailed comments that one might write for assembler code 'cause most comments are getting a bad rap these days.

My intuition told me that if we started with 3 doors, 1 car and 2 goats... that once Monte removed one of the goat/doors that if I did not change my guess that my odds were going to change from 33% to 50% regardless. Meaning that whether or not I did anything I was going to have the same odds. (spoiler alert: I was wrong)

So on my flight home I decided to solve the problem or at least simulate it. (the solution is over my head)

[sourcecode language="python"]
#!/usr/bin/env python
import …

Coda2 weakness

Coda2 is actually pretty cool but I do have a complaint. When you have a remote project and a local copy too. It's pretty easy to screw up the version control when you edit remote and local files ... accidentally you're now going to be merging on both systems. And that's a nuisance.