Entries Tagged 'development' ↓
April 20th, 2008 — development, python
This weekend I was helping out a friend when he pasted me some of the code from his latest project that happens to be written in C#:
(the only change I’ve made was to rename the identifying feature to XYZ)
namespace XYZ.Core
{
static class Entry
{
static void Main(string[] args)
{
using (Game game = new Game())
{
game.Run();
}
}
}
}
I know that monitors are getting bigger and bigger, but vertical space is still a precious commodity, so let’s try turning the above code into something that looks more like
namespace XYZ.Core
static class Entry:
static void Main(string[] args):
using (Game game = new Game())
game.Run();
This code is shorter and easier on the eyes, and I’m even ignoring the whole issue of having a class that simply has a static void main, as the authors of the cool Boo language point out, the people who came up with “public static void main” were kidding, it’s just that a few million Java/C# programmers didn’t get the joke.
For those of you that didn’t know where this was going, the above is just a few steps away from being valid Python (or for you .NET junkies perhaps Boo). Other people have addressed the myth of significant whitespace and I won’t go into great detail here, but I will say that Python essentially injects INDENT/DEDENT tokens that function in the exact same way as { and }.
What is often used as an argument against Python and other indentation-scoped languages is therefore really an advantage. {} are no more useful than the human appendix or other vestigial structures, the only reason that modern programming languages have them is that they inherited them.
If languages like Java/C# thought it was a good idea to free themselves of explicit memory management why not also free themselves of useless syntax that does nothing but clutter up code?
This divergence seems to only be growing wider, with languages like Python already free of these vestigial quirks, whereas languages like C++, Java, and C# continue to make their syntax more and more obfuscated. (eg. the tortured C++ lambda syntax)
This discussion on what syntax could be thought of as vestigial sparked some debate, some other potential candidates others suggested include the ++/– operators and PHP’s use of ->. I’d love to read comments with examples of other developers favorite vestigial syntax.
edit: A commenter over on reddit points out that the Lisp community had this right years ago. It does say something that one of the oldest languages is so free of the cruft that the traditionally more dominant curly-brace family has adopted. The idea that those who forget lisp are doomed to reinvent it is surely at work here.
Popularity: 9%
April 13th, 2008 — development, personal, python
If you’re one of the 20 or so regular readers, you noticed that the theme here just changed. I went with something a lot simpler than the other theme. Hacking on the previous theme became tiresome, I’ve switched to the much more generic copyblogger that is known for it’s clean code and therefore is easy to bend to my needs. Another mistake I made with the previous theme was not keeping my changes in revision control, so now all my changes are in a bazaar repository. If you have any trouble with the new site post a comment here and I’ll take a look at it.
I also wanted to take a minute to plug Steven Jackson’s blog here, which has been added to the blogroll. I should have had this on here earlier, he’s one of the developers I correspond with the most, and someone I run ideas by constantly. Most of his content is gamedev/gamedesign related. I know Steve from my sordid past as an member of the amateur game development community, he’s a freshman in college but has a pretty impressive skill set, and is one of the most determined developers I know.
As he mentioned on his blog I was working with him on an entry in PyWeek 6 which I’m sure even though it was my idea was somehow his plan to get me back into gamedev. Neither of us ended up having the time we would have liked to complete our idea, but we’re still talking about following through on it. It gave me an excuse to learn Pyglet and Cocos, two excellent python libraries. Most likely something (whether it’s our initial game or not) will come out of my having picked them up.
(This would also be a time to give a shoutout to his indie gamedev shop, Snowfall Media, that he’s set up with one other developer.)
Popularity: 6%
April 9th, 2008 — RIT, development, politics
This past weekend I had the pleasure of attending the (fantastically organized) Rochester barcamp 3 on the RIT Campus.
A barcamp is basically a group of knowledgeable people that get together and give talks on subjects that they care about. It’s quite possibly one of the coolest things I’ve had a chance to be involved in the entire time I’ve been at RIT. (I didn’t hear about the first one, and last year I was out of town)
I was originally going to give my talk on Django, maybe sprinkling in a bit of discussion on political data, etc. if I had time. Around midnight the night before Barcamp began however I decided to toss out my presentation and start from scratch. What I ended up with was in my opinion a lot better. 95% of the people at barcamp are technical, but I realized hardly any would be political.. this in my opinion was a problem.
Of course, one might think it would be risky giving a political talk at a tech-oriented event on a tech-oriented campus. My audience was on the small side, which was to be expected, and also brilliantly illustrated my first point: most of us are apathetic.
I only had 30 minutes, so my discussion on why people are apathetic was limited, but it led me to the discussion of a vicious circle wherein apathy fosters bad government which in turn fosters further apathy.
I closed the talk with examples of what developers can do which I grouped into two broad and somewhat overlapping categories: software to get people involved, and software to get people information.
Going beyond the obvious examples of flash mobs, blogs, wikis, and the like, I discussed several projects like the UK-based PledgeBank and WriteToThem. These are projects that push individuals to get involved by encouraging either collective action (in the case of PledgeBank) or in the case of WriteToThem getting people to do more personal than sign their name to what are typically meaningless e-petitions. (think “303,222 email addresses against Genocide in Darfur”)
I also pointed to examples of sites that aim to give people more information. Django creator Adrian Holovaty’s new site EveryBlock is a great example of just getting as much information as possible out to people and letting them do with it what they like. There is also the Sunlight Labs project EarmarkWatch which is a hybrid of sorts as it not only makes it easier to look at details of federal earmark spending, it also encourages citizen involvement due asking citizens to help research earmarks. The very idea of researching an earmark on your own is empowering, and can also be seen as an approach to get people more involved in at least questioning government.
(Disclaimer: I was lead developer on EarmarkWatch, although my thoughts here do not necessarily reflect those of the Sunlight Foundation)
Wrapping up my talk I asked the developers in the audience to make use of the massive quantities of government data that is out there. Or at the very least keep in mind the social responsibility that they have as being part of a uniquely skilled class with the power to control the machines and software that dominate so much of our everyday life.
The last slide ends with an equation: Django + Political Data APIs + Barcamp = ?
The discussion stemming from this talk actually led to a second talk later in the evening, where we attempted to answer this question. We ended up having a 3 hour discussion on how a few developers from RIT most with no former political experience could move on a project that will “change the world.”
Expect to hear more about that in coming weeks.
v1 of the slides that I gave (I’m working on an update as these were done in about an hour)
Slides in OO.org format
Slide overview in PDF format
Popularity: 6%
March 3rd, 2008 — C++, development
If everything goes as planned in about 11 weeks I’ll graduate from RIT which means no more depending on RIT email or web space.
The most accessed public resource that I have on an RIT server is GLFT_Font, a very simple C++ library for drawing text with TTF fonts using OpenGL. Despite it’s age I still get the occasional request for help or thank you letter, I certainly didn’t want to let it fall off the internet altogether in May so I’ve put up a new page about GLFT_Font in the new code section of polimath.
The old page (http://www.cs.rit.edu/~jpt2433/glftfont/) now redirects here. I do still answer questions about GLFT_Font despite it’s age, and I’m happy to accept any patches or contributions that any users may have.
Popularity: 6%
March 2nd, 2008 — development, todo
A Peek Into My Life
- pack for upcoming DC trip
- get haircut
- exchange book at Barnes & Noble
- finish reading The Universe in a Single Atom
- confirm w/ someone that policy seminar will count for minor capstone
- …
- come up with a better system for organizing all of these things I need to do
I’ve been having discussions lately with quite a few people gathering my thoughts and theirs on what can be done to make an improved todo list application. One of the tough parts of making a good todo list is that it that everyone’s mind is organized differently and therefore everyone seems to have different ideas of how a todo list should be organized. Are tasks organized via projects, categories, tags, sub-tasks? Do tasks have due dates? Can a task be recurring? What about priorities? Is there a need to estimate how long a task will take?
Everyone has their own answers to these questions, and because of this there is probably a new todo app created every day. If you hadn’t already guessed this post seeks to explore the idea of making one more.
A Crowded Field
I’m well aware that there are a number of popular todo lists that are already available. I used the extremely simple TaDa List for a while, for a long time I was a fan of the full featured Voo2do even spending a bit of time doing some email tech support for it’s creator. Seeking better Google integration among other things I recently gave Remember the Milk a try but found it didn’t really match the way I think of todo lists. I’ve taken a look at various others but they didn’t hold my interest as long as these three. I suppose in the interest of completeness I should also mention my own efforts to keep organized using Tomboy notes and a personal wiki.
There are tons of todo lists out there that are extremely simple, little more than bulleted lists, occasionally with due dates attached. There are quite a few that attempt to go in the other direction, offering countless features that are only useful to a select few (such as google maps integration or integrated time tracking). There are also many out there that save their best features for paying users.
What Now?
My issue with all of the above is that using a todo list should add value with minimal effort. A bulleted todo list can easily be replicated on paper, in any text editor, or in Google docs or a personal wiki. I really think that there is little reason to sign up for and learn to use an additional service to keep track of a bulleted list. What I want from my todo list are powerful views on data that is easy to enter. I want to be able to ask my todo list “what can/should I be working on now?” Ultimately this is the fundamental question, the reason we enter priorities, due dates, or can arbitrarily order our lists via fancy drag and drop interfaces.
The entire point of having a todo list is so we can always have a grasp of what is happening in the near future.
The problem then, is if our todo list offers an incomplete view of the near future. If our todo list only has those tasks that we take the time to painstakingly enter and assign priorities to. If our todo list only has those items that can easily be categorized and assigned a due date.
Rule 1: A todo list should be extremely easy to add to
A lot of the leading players get this right, requiring the minimal amount of information, and allowing for additional info to be added later. Also falling under this rule would be making information as easy as possible to add through nice features such as flexible formats for entering due dates. Making the interface nice and intuitive and allowing for things like emailing of tasks all increase the probability that a user will actually take the time to enter a task.
Rule 2: Not every item has a due date, but usually we have an idea of an approximate period in which we want something done.
Let’s look at my todo list, when is the due date for “pack for DC trip”? Well my flight leaves around 7am on March 3rd, so perhaps 6am? No I want to be packed the night before probably, so sometime this weekend would be good (perhaps instead of writing this blog post?) Even harder would be getting a haircut or finish reading the Dalai Lama’s book. Work tasks often are due within a week or so, but without a specific due date. When I’m back in classes in a week I’ll have more tasks with very specific due dates.
Nearly all of the existing offerings have two options for due dates, a specific day or no due date at all. But in reality no due date at all might mean “this week” or “whenever I get a chance.” In my discussions with people I’ve heard two common rebuttals to my claim that this distinction is important. ” If something should be done this week, just put in the last day of the week” is a fair compromise, although I feel it unnecessarily overloads the meaning of a due date. Perhaps “whenever I get a chance” is best left without a due date, but I find it is useful to at least set a general goal of when I’d like to finish a book by, if for no other reason as to keep me on track.
Now it’d certainly be nice if someone would come along and improve their todo list to support the concept of fuzzy dates. Sadly not enough people read this blog for me to believe this is going to magically happen, so I suppose I’m stuck doing it myself. My design skills are rusty so that part will probably take me a while (any volunteers are of course welcome). Comments on what makes a todo list worth using or pointers towards a great todo list that’ll make me doing this pointless are of course welcome.
Continue reading →
Popularity: 23%