Posted by Angelo Lakra
Tue, 01 Jul 2008 14:53:00 GMT
Every now and then I have to write something that gets my personal goals back on
track. I’ve found that the train ride into work is a great time for me to
reflect on things floating around my head before I begin the code grind at work.
I’m mainly speaking of my projects that I develop in Ruby, but will probably
have other aspirations written down as well.
There are a two specific projects that I wish to finish by the summers end.
They are canyoucodebetter and a mud. I think the biggest thing that has
been keeping me from working on them is time and fatigue. When I get home
around 6:30 PM I’m ususally involved with my immediate family (my wife and
daughter) until 9:30 PM. As you can imagine, that doesn’t leave a lot of time
for my projects as I try to leave for work at 7:30 AM. Trying to squeeze 8
hours of sleep in there leaves me the small time of 9:30 PM to 11:30 PM.
Unfortunately, by those times I’m so tired that I tend to stare blanky at
my screen more than coding real value.
So the train ride is my way out. I don’t have to focus on anything but
the laptop screen in front of me and making sure that I don’t crowd anyones
personal space. I guess my only complaint about the train is the glare that
the morning sun shines on my reflective screen.
Another thing about the train is that there seems to be public wifi spots at
each stop. However, there is not enough time to connect to one and do anything
useful before the train starts moving again. Bummer.
When I was Boston I fell in love with the public transit immediately. I would
go down to the caverns where the trains would stop and pick up people. They
reminded me of fast moving worms because of the way they would contort
like an accordian in the tunnels underneath the city.
I would get on and hop off, go to the surface and I was in a new place. MIT?
Sure. Harvard? No problem. It was great.
Posted in canyoucodebetter, life, ruby | Tags goals, ruby, train, trains | no comments | no trackbacks
Posted by Angelo Lakra
Wed, 04 Jun 2008 06:21:00 GMT
So I rewrote my little project little by little last week and finally deployed tonight. It’s now available. There is basic functionality for user authentication, code submission, restful formats for xml, yaml, html, and plain text. I still have update and remove functions to be added, but will do that later on this week. If you have any comments or feature suggestions, please send me an email or leave a comment.
Posted in canyoucodebetter, ruby | Tags canyoucodebetter, deployment | no comments | no trackbacks
Posted by Angelo Lakra
Mon, 28 Apr 2008 14:33:00 GMT
Unfortunately, something happened to my old blog’s software that caused it to crash every time the server started, so I reinstalled my blog with the latest version of typo.
Pesky segmentation faults.
Posted in linux | Tags blog, crash | no comments
Posted by Angelo Lakra
Thu, 17 Apr 2008 04:31:00 GMT
To the person who left the much needed money and the kind note in my mailbox:
Thank You
Posted in life | Tags kindness, random | no comments
Posted by Angelo Lakra
Sun, 16 Mar 2008 20:51:00 GMT
Here’s a link to a Flickr gallery containing my photos of my first day in Boston.
http://www.flickr.com/photos/11908617@N00/
Posted in life | Tags boston, pictures | no comments
Posted by Angelo Lakra
Sun, 16 Mar 2008 09:45:00 GMT
Dear mERB,
It’s hard for me to write this letter. We’ve spent a lot of time together, you and I. I’ve cherished it very much.
But you are so young and I can’t keep my hands off your light frame without feeling like I’m wronging the things that are most important in my life.
I’ve thought about this for a while, weighing my options. You have so much going for you and you will definitely be a star. But I’m not ready for so much change so quickly. I just can’t keep up.
I wanted to take you to so many places and I knew you would keep my threads safe. You could put on anything so easily and still look so good.
Maybe when you are older (1.2?), maybe you will settle down and we can start over. But till then, I wish you the best.
Yours truly,
Angelo (fozze)
Posted in merb, ruby | Tags merb, ruby | no comments
Posted by Angelo Lakra
Sun, 16 Mar 2008 09:34:00 GMT
Today I woke up in my hotel room at 5 AM. I’m feeling anxious to get a few things done before the week begins and I think my body is hungry.
I’m in Boston. I’m supposed to meet a lady later this afternoon to look for a suitable housing situation, but I just want to hack Ruby today while exploring the city. I’ve never been to Boston and am looking forward to using the “T”.
And, I’ve decided to finally do it. It’s time to break up with an affair I have with mERB...
Posted in merb, life, ruby | Tags boston, merb, ruby | no comments
Posted by Angelo Lakra
Sat, 15 Mar 2008 15:52:00 GMT
I’m about to leave for my first leg of my trip (with a connection in Denver) to Boston. I’m excited to see what I will come across when I enter the city and plan to write about my adventures here. Stay tuned…
Posted in life | Tags adventure, boston | no comments
Posted by Angelo Lakra
Mon, 18 Feb 2008 08:44:00 GMT
Recently, I have been questioning the validity of my project, canyoucodebetter.com, because my efforts haven’t been as strong and consistent as I would have hoped due to my other commitments. To get back on track, I have decided to hash out some of my ideas and issues for this project in my blog. So for those of you tuning in, I apologize for this public brain dump.
The Purpose
I was reading Paul Graham’s latest posts, Six Principles of Making New Things and Trolls, and was glad to see that he once again describes the substance of creativity, its unfortunate consequences and how he deals with it.
Well, I have to say that his article on principles seems right on track. I need to find a simple, overlooked solution to my problem (and what I believe are many other developer’s problems): the storing and retrieval of important chunks of code.
This has been done before and has been done fairly well on many levels. There are a handful of websites boasting great numbers of code snippets with tag clouds and web 2.0 style. Not to mention that every coder who has a clue is using some type of version control system. And, of course, there is always Google. So these archetypes are there, and they work and people are using them. But are they really solving the original problem well?
The Problem
My problem, at the most basic level, is that I need to store and retrieve important chunks of code. I want to do this is fast as I can encountering as little distraction as I am able. I want to type, click and read as little as possible. Command-line version control seems to offer the best bet, but I don’t want to spend time looking for someone else’s master branch, pulling it, and then greping it only to get some code without some type of context. So when looking for something that I don’t know how to do, I turn to the web.
When I use these code snippet sites, I always feel like I’m looking for a tool in someone else’s toolbox ; on top of that, I’m not sure I will even recognize the tool when I come across it. This is to be expected, but I’m not convinced that many of these sites spent much time on efficient usability as they did making sure that their sites look and acted in a trendy web 2.0 manner.
Now, I’ve run into a couple code repository sites that definitely had an essence of simplicity and unobtrusiveness, which I greatly appreciated, but the content wasn’t what I was looking for and it still felt like more could have been done to quickly retrieve code into my editor.
More Problems
Let’s say that I found a piece of code that says it is what I am looking for. How do I know this code even works the way I need it to or even as described by the author? The other day I nabbed a snippet of Ruby code in method form off a site for a fairly elaborate algorithm that returned the current time minus another time as text (e.g. “5 days ago”, “yesterday”, etc.). After copying the code and testing it, I found it had an off by one error. It couldn’t tell the difference between yesterday and the 2 days ago (it would always display yesterday).
I ended up rewriting the whole method, using the basic idea that the original author came up with and wrote what I thought was a better solution, but even my code could be missing a case I didn’t think of. There’s a definite quality issue here. How can these snippet sites ensure that their code has a certain measure of acceptable quality? Peer review! Of course (but you already knew that, right?) I’ll write more on this later in this post.
Written code takes space on the screen and if you are trying to make an impression, do it by acting like a killer application and not a menace. Be as unobtrusive, yet useful as possible. I hate chasing after an already worked solution link by link. I also really hate when my focus is minimized for the content I’m looking for compared to things I don’t care about. Multiple advertisements, grossly over-sized logos and unnecessary site descriptions are the worse culprits. This is the garbage of the web.
So in summary, these are the current problems with all snippet sites:
- It can be hard to find the right code solution.
- Quality isn’t guaranteed.
- Code content is surrounded by distraction.
- Everyone is hashing out the same solution without learning from history.
A Solution
I like Paul Graham’s essays. People says he just got lucky and they are right, he did. But he has considerable wisdom in the the things he says because of his basis on experience and history. This is my take on his principles to solve my problem: storing and retrieving code snippets via a website and my code editor.
- I’m going to imitate what I like.
- I’m going to code the solution as simply as possible.
- I’m not going to use a single graphic on my website (it’s just not important for this application).
- I’m going to make sure that I don’t have to leave my editor to get/search/post/comment/whatever a snippet.
- I’m going to be informal with my releases while quietly listening to feedback from users and site usage.
- I don’t care about my competition, their solutions don’t solve my problem efficiently anyway.
Snippets will be organized as lists that can be modified and saved by the users using regex, plain text, tags, or languages.
Snippets can have many revisions/branches with authorized access/modifications controlled by an original author.
Revisions will be ranked by its users which will inherently rank the authors who write the code to ensure quality is maintained.
Snippets may have references to source sites and nested comments per revision.
Users will have the options of saving snippets they find useful. Users will also have a message wall (similar to facebook’s wall without all the crap) and an inbox so they can communicate directly with other users publicly and privately.
Users will be able to watch other users actions of their choosing on their wall. (provided a watched users allow their actions to be tracked)
Anonymous/Unregistered users can read and download from the site as much as they desire (except for private snippets). Only registered users can post. And only ranked users can branch/revise other users snippets (revision with authorization from original author)
Registered and anonymous users can make requests for code they would like to see on the site. Rank will be rewarded to those who offer solutions to these requests.
Spam will be allowed to be marked by registered and ranked users.
New languages can be added by registered/ranked users.
Merging will be available for original authors to merge their master code with other branches.
Webservice API will be made available.
An Implementation
canyoucodebetter.com will take the best ideas from the web interfaces of gmail and reddit, the power and speed of git, the thread safety of mERB, and the flexibility and expressiveness of Ruby.
I’ll give more details about this when I’ve got an initial version out.
The Money, Money, Money
Right now, there is no model. I’d hate to pollute my site with advertising, but I think I have time to think about this one.
Conclusion
It’s late. I’d hate to end so abruptly, but I think this hash is good enough to start hacking. Let me know what you think if you care.
Posted in canyoucodebetter, merb, ruby | Tags canyoucodebetter, code, coding, creativity, merb, purpose, repository, ruby | no comments
Posted by Angelo Lakra
Sun, 27 Jan 2008 22:27:00 GMT
canyoucodebetter now on gitorious
I’ve decided to release the source code of my personal mERB project, canyoucodebetter, to the public (under MIT License) through a git repository called gitorious. The project page should allow you to grab the latest revision of this app.
I hope this move will expand its usage and allow more feedback to improving the application.
More details on the features of canyoucodebetter will come soon…
Posted in canyoucodebetter, linux, merb, ruby | Tags canyoucodebetter, code, git, gitorious, merb, repository, ruby, snippets | no comments