High Notes

High Notes

High Notes  //  Thoughts on programming languages, software development, entrepreneurship and any other things that I find interesting.

Jan 9 / 5:41pm

Pun Intended?

A fire can’t keep burning without fuel, and profits are the fuel for business.

http://bit.ly/zkFcog

Comments (0)

Jan 8 / 7:55pm

New Year, New Posts

I guess I haven't been the best blogger during the last year; but my intention is to change that. My plan is that this new year I will be writing more often to this blog. Hopefully I'll still get a few readers. What have I been up to? I moved out from the US, got married, and I'm about to have a baby girl in a few months. It's been a great time!

Oh... and I also got a puppy, here it is: 
206008_10150730562190611_78295

Anyways, I'll try to write more often about software related stuff in the near future. Have a great new year!

Comments (0)

Jul 17 / 11:14pm

My Defense of Software Engineering

It has come to my attention the amount of bashing that Software Engineering has taken lately. Software Engineering has been described as something that doesn't work and as a waste of resources. Well, I don't think that's always the case and I will try to explain why.

Before starting, don't take me wrong. I'm a strong supporter of agile development (I even made a tool for burndown charts). I understand that developing software is something that involves both an artistic side and an engineering side. Creatively solving problems is an art. Using the tools that provide you assurance that your elegant solution works is engineering. There should be a balance of those two sides. Too much art, and you risk not being able to make profits, and too much engineering and you risk delivering mediocre products.

Waterfall

So having said that, my first argument against Software Engineering bashing is that colleges (at least in 2010) don't teach the waterfall model as a successful way of developing software. The waterfall model doesn't work, there's evidence of that. What's taught in software engineering classes is both the unified process and agile development. Most of the emphasis is placed on the unified process though. I wouldn't say that UP is perfect, but it has several good things:
  • It uses iterations. The product is developed incrementally.
  • It has a defined procedure for managing changes. Plans can be adapted to change.
  • It can be used in extremely large projects.

Would I prefer doing UP instead of XP or Scrum? No. Would some customers prefer UP over XP? Yes. Why? Well this brings me to my second argument. Some people find value in what others consider bullshit. Every software process produces two things:
  1. Software: Your precious executable code.
  2. Artifacts: Byproduct stuff used for support. All documents, models, to-do list, conversations, emails, etc... Some people consider artifacts bullshit. But the thing is that you can't produce a relatively complex piece of software without producing artifacts.

So depending from your point of view on artifacts, you could say that there's a lot of bullshit taught in Software Engineering classes. Since Software Engineering deals with well... the engineering part of software development, you will learn a lot about different types of artifacts you could produce.

On the other hand, agile development focuses on the software. Working software is the most important measure of project success. That is a fact, or at least seems to be a fact for most reasonable individuals in the field. But let me tell you a little about my past to see another perspective.

I worked as a consultant for X company. This is a big business, a global corporation. Now, big companies like to have ISO certifications; they love standards. Since they're so big, standards and certifications give management an illusion of control over their thousands of workers.

So going back to me, I was assigned to work on a project for them. Guess what? The end users weren't terribly excited about it. They didn't really care if they got something better as long as it looked the same as the older version. 

Bullshit

Learning more about how the deal for this project was made; I discovered that it was approved by the IT department because they had to burn extra cash, ensuring to use all their budget. Otherwise they would get a budget cut the next year.

So the situation was that the IT department was building unnecessary software to meet their budget. What do you think was more important for them? Artifacts that supported their company wide certifications? Or the working software? What would work better for them, UP or agile software development?

Artifacts

Is that a great way of building awesome software? No. But this type of things happen very often in this industry. Businesses require their artifacts and love processes that produce lots of them. Agile development is not good for these people. What if you're working with a customer that doesn't trust you? There's no way of doing agile development if you can't collaborate and establish relationships with your customer. What are you supposed to do?

I don't know about you, but at least at the time that I was a consultant, I couldn't give myself the luxury of "firing the bad customer". If you're in the awesome situation in which you have absolute control of your customers, and you are still profitable; then congratulations, you're part of a privileged minority. But most people can't do that. Agile development doesn't give you a great deal of advice when you can't be agile. "Life is short, look for another job." that's the soft of advice you would get. I agree, but in the meantime you need your job.

So once again, there's no silver bullet. Agile development isn't the awesome place were all your software projects will go perfectly and your customers will live happily ever after. Learning different points of view will give you a much better toolbox to deal with the bullshit.

Wall_street_bull1
So that's why there's a giant bull in wall street.

Comments (2)

Mar 7 / 4:19pm

Culture and Programming Languages

As an international student, I've gone to different orientations. Most of these orientations are boring, but during one of the sessions I saw a chart that was interesting:

Population

Apparently there are two types of cultures in the world: Individualistic Cultures, in which the average citizen is more focused on his or her own personal achievements (jobs, career, etc...) and Collectivistic Cultures, in which citizens tend to work for the well being of every one else (especially the family). There's nothing wrong with individualistic cultures, as well as there's nothing wrong with collectivistic cultures. They're simply different.

Most countries in North America and Europe, fall on the individualistic category. Asia, Latin America and Africa fall on the collectivistic category. Obviously these categories are not a black and white thing, it's more like a grade of shades.
Collective_individualist

So what does this has to do with software?
In 1990 Sun Microsystems started a new stealth project to reduce the amount of time that developers lost with memory management. They wanted a programming language that was portable between different platforms and that was easily used on embedded systems. The end result was Java.

In 1990 Yukihiro "Matz" Matsumoto wanted a programming language that was more powerful than Perl, and more object oriented than Python. His design philosophy was that computer systems needed to emphasize in human needs, rather than computer needs. That's how ruby was developed.

Ruby was developed in Japan, Java in the US. Ruby was targeted to humans, Java was targeted to machines... Makes sense if you think in the cultures that influenced their development. Next time I'm programming in Ruby and I start feeling happy, I'll remember this.

Comments (1)

Feb 10 / 11:54am

Consistency is not Always Good

Since the first time I used OS X, I noticed that things just "felt right". Small decision as font sizes make a big difference. Look at this picture.

Mac_vs_windows_fonts

That's windows 7 running on vmware fusion. Compare the font sizes of the menus. OS X has larger fonts, it makes sense you have to click on them. WIndows tries to be consistent and use the same font size for menus, icons, and address bars. OS X focuses on what's easier for the user. Icon labels and windows titles have a smaller font than menu bars. Again it makes sense, you don't have to click on the labels.

Sometimes it's better to drop consistency in favor of usability.

Comments (0)

Feb 5 / 4:13pm

Basecamp Authentication Change

In december of 2009, 37signals changed their authentication scheme for all their web applications. The way third party applications connect and interact with Basecamp changed as well. Basecamp now supports the use of authentication tokens. Authentication tokens, are randomly generated strings that act as keys to give access to a something (in this case Basecamp data). 

Authentication tokens have several advantages over regular usernames & passwords. First of all, third party suppliers no longer need to store a copy of your passwords. Not having to store passwords helps reduce security risks. Another advantage is that if you decide to change your 37signals id password, you don't need to go to each of your third party extras and update your password. Applications can access your data no matter what changes you make on your 37signals id.

Currently Basecamp supports API access either through usernames & passwords, as well as through authentication tokens. But, in a near future, API access through username & password will be disabled. For this reason we're changing the settings screen so that you can provide us your API token. All Burndown users should change their Basecamp authentication credentials soon. To do so, go to the Settings tab, and you will find there a link for using a Basecamp API token.

Where can you find your Basecamp API Token?
To get your Basecamp API, go to your Basecamp web page. On the upper right corner you'll find a My Info link.
My_info

Once inside the My Info page, scroll down to the Authentication Tokens section.
Hidden_tokens

Click on the Show your tokens link, and copy your token for feed readers or the Basecamp API.
Open_tokens

Now paste it into Burndown. 

So go ahead change your Basecamp credentials soon, because in a near future your username & password won't work anymore.

Comments (0)

Jan 19 / 2:40pm

New Burndown Improvements

We know you love Basecamp; and we know that having to switch constantly between Burndown and Basecamp can be time consuming. For this reason we recently added automatic daily synchronizations. Now you can configure a time of the day in which you want Burndown to synchronize with Basecamp. You don't require anymore to manually synchronize your charts, the daily synchronization will take care of that.

Continuing with the usability improvements; today we're excited to introduce another feature: "Basecamp Message Posting". Now you can get your burndown chart posted as a message into your Basecamp project. This is how a posted chart will look inside Basecamp:

Screen_shot_2010-01-19_at_4

Basecamp message posting occurs right after your daily synchronization. You can customize if you want your burndown charts posted daily, weekly or at the end of an iteration. You can also disable the message posting. To configure this new feature check your settings tab.

I hope you find these new features as useful as we have!

Comments (1)

Nov 19 / 9:53pm

:Treetop => "Parser in Ruby"

I built a parser a few days ago using treetop. Treetop is an awesome ruby gem for writing parsers in ruby. The syntax is very clean and elegant, and you don't need to handle countless auto-generated files. Treetop grabs the grammar file on the fly and automagically loads the classes that you need. Pretty neat.

Once you parse text with your parser, treetop returns to you a syntactical tree. To avoid navigating through the syntactical tree, treetops allows you to add methods to your grammar. You can then call these methods in the syntactical tree. Here's an excerpt of the grammar I'm working on:

grammar RepositoryProtocol

  rule message

    credential / response / request / reply / challenge

    {

      def node_type

        "message"

      end

    }

  end

  rule credential

    credential_hdr public_key certificates credential_end

    {

      def pk

         public_key.data

      end

      def certs

        certificates.certs

      end

      def node_type

        "credential"

      end        

    }

  end

  # obviously more stuff goes down here...

end

 

Now lets talk about the dark side of this tool. There are two problems that I found while using it:

1- Lack of documentation: You can find pretty simplistic examples of grammars in the tools homepage and its github repository. Unfortunately if you need something more complex then a calculator, you're pretty much on yourself. If you google for a while you will find some more complex grammars written out there, but the truth is that the learning curve is a bit steep. For instance it took me quite a while to realize that the syntactical nodes only provide two methods to query a node: elements (an array of child nodes) and text_value (the text contained by the node). Even at this point I'm still not 100% sure if these are the only methods available. Also, if your rule is very simplistic (I mean it lacks or's, *'s, +'s, etc...) , then treetop will add methods with the same name as your grammar rule sons.

2- If you name a rule as something that treetop uses internally you're screwed. This sucks really. There's no message, no list of reserved words, no nothing. So if a rule doesn't work for any logical reason, try renaming it.

3- Nodes don't have a way to identify themselves. There's no node_type method to call to figure out what you're navigating in. If you really need to do that, then you'll have to manually add a node_type method to each rule.

4- No easy way to ignore white spaces. You have to provide a rule in your grammar to handle white spaces, tabs, \r's and \n's.

5- And finally, this problem really took me a while to figure it out. Treetop doesn't really construct the syntactical tree following your grammar literally. Take for example the following rules:

 rule clause

    implication / single_atom

    {

      def import(rsa_key)

        internal_import(rsa_key)

      end

 

      def node_type

        "clause"

      end

    }

  end

  rule single_atom

    literal "."

    {

      def internal_import(rsa_key)

        "#{literal.import(rsa_key)}."

      end

 

      def imported_clause?

        literal.imported_clause?

      end

 

      def node_type

        "single_atom"

      end

    }

  end

 

  rule implication

    literal ":-" literal other_literals "."

    {

      def import(rsa_key)        

        elements.inject("") do |imported_string, e|

          imported_string << if e.respond_to? "import"

            e.import(rsa_key) 

          else

            e.text_value

          end

        end

      end

 

      def node_type

        "implication"

      end

    }

  end

 

  rule other_literals

    ("," literal)*

    {

      def import(rsa_key)

        elements.inject("") do |imported_clause, e|

          imported_clause << ",#{e.elements.last.import(rsa_key)}"

        end

      end

    }

  end

  

  rule literal

    ( "says(" iden "," predicate ")" space ) / predicate

    {

      def import(rsa_key)

        "says(#{rsa_key}, #{text_value})"

      end

 

      def node_type

        "literal"

      end

    }

  end

Following the grammar of the previous example I would expect the following to be the way in which the syntactical tree for an implication cause to be generated:

But instead I get a tree like this one:

Somehow treetops decides that clause and implication should be the same node and adds some methods of clause to the tree and others from implication. For that reason I use the strange import_internal for some paths, and on others I call import directly. So don't expect the syntactical tree to be an exact representation of your grammar, treetop might be trying some tree optimizations I guess. 

Even with all it's problems I sincerely consider this tool much more intuitive than Antler. The syntax is clean and if you don't try to make fancy tricks like making a language translator you should be safe. So if you need a parser on your next ruby project make sure to give treetop a try.

Comments (1)

Oct 29 / 1:24pm

Been busy lately.

I haven't been posting as much as I would like lately on this blog. Graduate school is keeping me pretty busy lately. Right now I'm taking a Computer Security course that's taking more time from me then what I would really like to. Although at this point I'm feeling a bit regretful, I've been doing some cool stuff lately. From code injections on broken C applications to exploit buffer overflows, remote attacks to web servers, using clusters to break passwords by brute force, up to using prolog for weird ways of security policy definition.

I've also started my final project. I picked up to make a solution for a problem I had while integrating a rails application to a ActiveMQ. You see, in corporate software, there are these things they call "Enterprise Integration Servers". These things are like the key part of the SOA architecture. Although I'm not a big fan of SOA, I can see that there's a lot of value in the so called Enterprise Integration patterns. These patterns are well defined ways for applications to communicate between each other. In the rails side of the world, you communicate between applications using REST. That works great, but when you need to decouple one application from another (specifically the application that sends the resource), or you need to make some fancy sort of queueing, you end up repeating yourself. Sure, you can use ActiveMQ, and using the wonderful ActiveMessaging plugin, but if you're like me, you will not like the idea of having to run this Java server. REST is awesome, rails applications should not rely on STOMP, JMS or other weird things to do their job.

So my final project will be a RESTful messaging server that will implement the design patterns that are described here. I already build a prototype using rails and the delayed_job pattern. I'll be posting more about this project later on.

Anyways, as the old saying says, "don't let school get in the way of your education". I'm gonna try to keep posting more often...

Comments (10)

Sep 25 / 7:06pm

Burndown now has comments!

We're proud to introduce a new feature on burndown, comments! Project management shouldn't only be about charts; communication is more important. 

Comments

Now users have pictures. One important note, the pictures of the users are grabbed from Gravatar by using your email address. So if you already have a gravatar created (if you use github for example) your picture will be displayed right away. If not you can easily create a gravatar account and import a picture for your self.

Taking advantage of these changes we also reorganized a little bit how the configuration of burndown was done. Previously we had both an Account and a Subscription tab. Both tabs were quite confusing to understand because both words have a similar meaning. Instead we have renamed the Account tab to Settings, and we have moved the User setup to it's own tab. Now things are more clear... three tabs, 1 for users, another for settings (basecamp connectivity, domain name, etc...) and another one for your subscription details (the plan in which you're at).

Now all the discussion regarding the state of the burndown can happen right were you see it. We're very excited about these new features and we hope you love it. We think it'll transform the way you use Burndown.

Comments (0)