I ordered myself an ipod touch the other day.
I already have an old ipod shuffle, which I take with me on runs. I also use it to listen to pod casts on long car drives. I can say I'm very pleased with it.
The question is now:
Why?
Why did I order the ipod touch. The answer is that not so much for the music. It is certainly a big step up from the shuffle (which will continue to serve me when excercising), especially having my entire music library and all the podcasts available at whim. Nonetheless, I didn't order it for the music.
I ordered it because it looks like a good portable computing device. No, I don't intend to program on it. I intend to read ebooks on it like I did with my ancient Palm Tungsten E until it passed away. I intend to finally organize my life in some sort of calendar (maybe I'll finally know what happens with me in the weekends). I'll definitely look into some GTD organizer. Some Japanese learning app will definitely find its way in there. I'll probably think of some other useful uses.
And that's the reason I'm buying the touch - because it is extensible. I'm sure a year from now I'll find a dozen more good uses for it.
Too bad it doesn't have a camera...
Showing posts with label Miscellaneous. Show all posts
Showing posts with label Miscellaneous. Show all posts
Monday, September 28, 2009
Monday, July 20, 2009
Configurability
A while back I stumbled upon the following vim command, which opens a file explorer view. Now, this is truly scary stuff. I was as shocked and disappointed as you probably are. Assuming you're me, that is, and you're most likely not me. You just might be that other person who reads this blog, in which case you probably have no idea what I'm whining about. Alas, to explain, we have to go a little bit back in history.
The best way to travel back in time is the "Once Upon A Time - Man" way. We'll use Peter, which Wikipedia tells us is the very embodiment of the Good Man, as our guide.
In ancient times Peter lived with his entire extended family in the same house. Maestro was the leader of this establishment, and everyone, from Jumbo to Pierrette, went to sleep at night under the same roof. It was one big happy family.

As time went on, and social orders changed, the atomic unit shrank to include only the immediate family. Peter had to leave his parent's house and make his own way in life. After finding a lovely life (people who are Good have beautiful wives), he would get his own place and raise his children there. Until they got kicked out because they were lousy bums who had to get a job.
Nowadays, Peter and his present day wife would probably get divorced, so the family unit is now as small as it gets, unless the universe gets very creative.
Okay, we finished our time travel, and you probably have no idea why a little file explorer freaked me out. I guess we'll just have to make the same journey again until you get it.
A couple of thousand years ago, after the petty city states finished their squabbling, it was pretty nifty to be a king. As a king you were a member of a very small club. There just weren't many kings back then. Every once in a while someone would go around conquering half the world, limiting the number of nations and thus the number of kings.
This continued until just after the world wars and the rise of nationalism, which resulted in everyone wanting their own state. Wolfram Alpha says there are 203 sovereign states right now. Unfortunately, Wolfram Alpha can't answer the simple query: "Number of countries as function of time", but neither can google. You can imagine that over the past centuries this number is an increasing function.
Now, not only does the number of states increase, their power decreases as well. When once a totalitarian state was a pretty simple matter, the internet has made it much more difficult. Not only because Iranians protesters can twit, but also because Hezbollah backed Palestinian terrorists can coordinate attacks and learn how to make bombs. The state is no longer omnipotent.
One more diversion before I get to the point, which should be quite anticlimactic. When Henry Ford made the Model T, all the cars were black. Now they come in a wide range of colors. In addition, everyone wants his very own custom T shirt. I'll leave Apple out of it for the moment, because I'm going to get back to them soon. Everyone besides Apple wants you to have a unique user experience, complete with a customizable theme.
The Point. When I saw that Vim has a file explorer, I was terrified that it would go the way of the emacs. I hate it when a software not only allows, but actually expects you to customize everything in it. This is why I was afraid that Vim was starting down the road that would make it a good OS (albeit lacking a good editor). Emacs tries to do everything, and it tries to let you do everything. That just sucks, no matter what estimmed blogger Steve Yegge says.
For example, I mapped my Win key to the escape key, so that I can quickly switch between normal and insert mode. The annoying thing is that this only works on my machines. When I use a different machine, things suck. This is why I hate Configurability. I prefer uniformity. And I much prefer stuff That Just Works. This is the Apple part I promised two paragraphs back.
I could go on for much longer on this issue, and I probably should. Alas, I've written too much stuff already, without even explaining how everything relates, and the wife deserved some attention. More later.
p.s.
The file explorer in Vim is ok. It's just a file open dialog box. So Vim is still good.
The best way to travel back in time is the "Once Upon A Time - Man" way. We'll use Peter, which Wikipedia tells us is the very embodiment of the Good Man, as our guide.
In ancient times Peter lived with his entire extended family in the same house. Maestro was the leader of this establishment, and everyone, from Jumbo to Pierrette, went to sleep at night under the same roof. It was one big happy family.

As time went on, and social orders changed, the atomic unit shrank to include only the immediate family. Peter had to leave his parent's house and make his own way in life. After finding a lovely life (people who are Good have beautiful wives), he would get his own place and raise his children there. Until they got kicked out because they were lousy bums who had to get a job.
Nowadays, Peter and his present day wife would probably get divorced, so the family unit is now as small as it gets, unless the universe gets very creative.
Okay, we finished our time travel, and you probably have no idea why a little file explorer freaked me out. I guess we'll just have to make the same journey again until you get it.
A couple of thousand years ago, after the petty city states finished their squabbling, it was pretty nifty to be a king. As a king you were a member of a very small club. There just weren't many kings back then. Every once in a while someone would go around conquering half the world, limiting the number of nations and thus the number of kings.
This continued until just after the world wars and the rise of nationalism, which resulted in everyone wanting their own state. Wolfram Alpha says there are 203 sovereign states right now. Unfortunately, Wolfram Alpha can't answer the simple query: "Number of countries as function of time", but neither can google. You can imagine that over the past centuries this number is an increasing function.
Now, not only does the number of states increase, their power decreases as well. When once a totalitarian state was a pretty simple matter, the internet has made it much more difficult. Not only because Iranians protesters can twit, but also because Hezbollah backed Palestinian terrorists can coordinate attacks and learn how to make bombs. The state is no longer omnipotent.One more diversion before I get to the point, which should be quite anticlimactic. When Henry Ford made the Model T, all the cars were black. Now they come in a wide range of colors. In addition, everyone wants his very own custom T shirt. I'll leave Apple out of it for the moment, because I'm going to get back to them soon. Everyone besides Apple wants you to have a unique user experience, complete with a customizable theme.
The Point. When I saw that Vim has a file explorer, I was terrified that it would go the way of the emacs. I hate it when a software not only allows, but actually expects you to customize everything in it. This is why I was afraid that Vim was starting down the road that would make it a good OS (albeit lacking a good editor). Emacs tries to do everything, and it tries to let you do everything. That just sucks, no matter what estimmed blogger Steve Yegge says.
For example, I mapped my Win key to the escape key, so that I can quickly switch between normal and insert mode. The annoying thing is that this only works on my machines. When I use a different machine, things suck. This is why I hate Configurability. I prefer uniformity. And I much prefer stuff That Just Works. This is the Apple part I promised two paragraphs back.
I could go on for much longer on this issue, and I probably should. Alas, I've written too much stuff already, without even explaining how everything relates, and the wife deserved some attention. More later.
p.s.
The file explorer in Vim is ok. It's just a file open dialog box. So Vim is still good.
Thursday, July 9, 2009
One Year Summary
A bit over a year ago I started this blog. I didn't know much about blogs and twitter and such at the time. After a year of blogging, I'm afraid I still don't. I think my main pain is that I still write these posts in the damn web UI. I'd much rather write in vim, but I haven't found the time yet to figure out the best way to do it.
During the past year I made many public promises to myself, on this blog and the others. I haven't really lived up to all of them. I have a consistent problem of trying to do too many things. Working full time and studying Japanese have taken up nearly all of my time.
While I didn't get down to writing a game in Python like I wanted to, I did manage to learn the language. Luckily, it was a perfect fit for many of the tasks I had to do at work, and it was a joy to learn it. I have my gripes with the language, but since I work in C++ most of the time, its a very welcome change. Needless to say, Python code is much more readable. C++0x has the auto keyword which will help, but a static language will never be able to match a dynamic one in this criteria.
I intend to continue studying Japanese, though maybe not in a university framework. I have to figure out if I want to start studying for a Master's in Physics or not. None of the courses I can take will be easy in conjunction with a full time job. I may end up preferring not to take any official obligation and spend time studying the things I like by myself.
We'll see how the next year will come along...
During the past year I made many public promises to myself, on this blog and the others. I haven't really lived up to all of them. I have a consistent problem of trying to do too many things. Working full time and studying Japanese have taken up nearly all of my time.
While I didn't get down to writing a game in Python like I wanted to, I did manage to learn the language. Luckily, it was a perfect fit for many of the tasks I had to do at work, and it was a joy to learn it. I have my gripes with the language, but since I work in C++ most of the time, its a very welcome change. Needless to say, Python code is much more readable. C++0x has the auto keyword which will help, but a static language will never be able to match a dynamic one in this criteria.
I intend to continue studying Japanese, though maybe not in a university framework. I have to figure out if I want to start studying for a Master's in Physics or not. None of the courses I can take will be easy in conjunction with a full time job. I may end up preferring not to take any official obligation and spend time studying the things I like by myself.
We'll see how the next year will come along...
Tuesday, June 9, 2009
New Computer
I'm writing this on a new computer I got yesterday. It's called Fit PC2, and it's really really small, and pretty green as well.
Not as cool as a new mac, but nice none-the-less. It's ridiculous how small these things have gotten.
Not as cool as a new mac, but nice none-the-less. It's ridiculous how small these things have gotten.
Sunday, March 15, 2009
Language Verbosity
I recently took a look at the upcoming C++0x specification, and I was annoyed that yet more keywords were introduced into the language. C++ is already a very complicated language, and it takes months and years to truly master. I just didn't think that introducing more keyword would advance the language. In some sense, the size of a language's vocabulary is a measure of the language's complexity.
My concern is that as the technology advances, it will become increasingly difficult to be proficient even in one single language. The learning curve just becomes steeper and steeper with time, which is fine if you're there when they make the curve steeper, but not if you're at point zero. And I know that specialization happens for all sciences as they advance, but programming isn't a science and a programming language is a tool, not a science (from the user's point of view).
Natural languages (such as the one you talk to your mom with, I hope) are not like that, however. Their vocabulary size increases with time, regardless of the language. Unless your language of choice is Newspeak, of course. Another curious fact about human languages is that they allow one to learn the language, using the language. This might not be too clear, so I'll illustrate:
John Robert Jr IV is 6 years old. His parents speak English (not American, mind you). Little Robert can't understand everything his intellectual parents say, but, by the time he starts his studies in a snooty British college, he'll have already mastered the language. How did this happen? Little Robert doesn't know any other languages but English!
The answer is that one can use English to learn English. This happens because you can understand snippets of code, er, words, and understand the rest from the context and the non-verbal information (intonation, body language, ...). In addition, there are always several ways of saying anything, at different levels of complexity. There are synonyms for nearly all words, some down-to-earth, others only for people with a PhD. in Literature. This is how Robbert will slowly learn new words which better articulate what he wants to say.
Sorry, but we really need to get back to programming languages.
Programming languages are like that as well. C++0x may introduce many new constructs, but you don't really need to use them. When I started programming in C++, I simply changed the file extension to .cpp and continued programming in C. I eventually started using the object-oriented facilities, and after that started learning what the STL really has to offer. So I think there's room for hope. Having different ways of saying the same thing, some concise, some verbose, is actually a good thing.
This is one of the clashing points of two of my favorite languages - Perl and Python. The Perl philosophy is that there should be many ways to perform the same task. Python believes there should be one (see The Zen of Python). And the thing is that Larry Wall studied linguistics. The language he devised may be a write only language, but the basic idea of having many different ways of expressing yourself doesn't just give you the opportunity to make yourself clearer, it also makes learning the language easier. You can learn new tricks as you go along, but it doesn't block you from getting what you want done.
Of course, the above isn't really true for Perl, unless you can remember what $x is for any x, but the potential is there.
My concern is that as the technology advances, it will become increasingly difficult to be proficient even in one single language. The learning curve just becomes steeper and steeper with time, which is fine if you're there when they make the curve steeper, but not if you're at point zero. And I know that specialization happens for all sciences as they advance, but programming isn't a science and a programming language is a tool, not a science (from the user's point of view).
Natural languages (such as the one you talk to your mom with, I hope) are not like that, however. Their vocabulary size increases with time, regardless of the language. Unless your language of choice is Newspeak, of course. Another curious fact about human languages is that they allow one to learn the language, using the language. This might not be too clear, so I'll illustrate:
John Robert Jr IV is 6 years old. His parents speak English (not American, mind you). Little Robert can't understand everything his intellectual parents say, but, by the time he starts his studies in a snooty British college, he'll have already mastered the language. How did this happen? Little Robert doesn't know any other languages but English!
The answer is that one can use English to learn English. This happens because you can understand snippets of code, er, words, and understand the rest from the context and the non-verbal information (intonation, body language, ...). In addition, there are always several ways of saying anything, at different levels of complexity. There are synonyms for nearly all words, some down-to-earth, others only for people with a PhD. in Literature. This is how Robbert will slowly learn new words which better articulate what he wants to say.
Sorry, but we really need to get back to programming languages.
Programming languages are like that as well. C++0x may introduce many new constructs, but you don't really need to use them. When I started programming in C++, I simply changed the file extension to .cpp and continued programming in C. I eventually started using the object-oriented facilities, and after that started learning what the STL really has to offer. So I think there's room for hope. Having different ways of saying the same thing, some concise, some verbose, is actually a good thing.
This is one of the clashing points of two of my favorite languages - Perl and Python. The Perl philosophy is that there should be many ways to perform the same task. Python believes there should be one (see The Zen of Python). And the thing is that Larry Wall studied linguistics. The language he devised may be a write only language, but the basic idea of having many different ways of expressing yourself doesn't just give you the opportunity to make yourself clearer, it also makes learning the language easier. You can learn new tricks as you go along, but it doesn't block you from getting what you want done.
Of course, the above isn't really true for Perl, unless you can remember what $x is for any x, but the potential is there.
Sunday, March 1, 2009
And Then There Were Two
I have decided to split this blog in two. All the programming related posts will remain here. The Origami posts will move to their new home at: http://origamitips.giladnaor.com
I hope this will allow me to better concentrate on each subject. Good week!
I hope this will allow me to better concentrate on each subject. Good week!
Thursday, February 19, 2009
Source Code Highlighting - In Blogger!
There are a great many posts on how to post syntax highlighted code in blogger. I can't really understand why google doesn't have a ready made solution in place.
I think I've found a solution I'm comfortable with:
For extra credit, you can modify the css for <pre> sections.
If you want line numbers:
edit: Ars Pythonica has added that in your .vimrc file, you can add: "let html_use_css = 1" to include css in the output.
Thanks to:
I think I've found a solution I'm comfortable with:
- Convert the code to html (":TOhtml" in vi)
- In the Compose tab, type: <pre> </pre>
- Paste you code between the tags
- Publish
For extra credit, you can modify the css for <pre> sections.
If you want line numbers:
- ":set nu" - show line numbers in vi
- ":TOhtml" - convert to html
- ":set nonu" - remove line numbers for easy copy & paste (or, use Ctrl-V)
1 #include <stdio.h>All that's left is to find a good color scheme for vi.
2
3 int main( int argc, char *argv[] ) {
4 printf("Hello World!\n");
5 return 0;
6 }
edit: Ars Pythonica has added that in your .vimrc file, you can add: "let html_use_css = 1" to include css in the output.
Thanks to:
- Eli Bendersky - for the pre trick
- FluidBlog - For the vi TOHtml trick
Friday, January 23, 2009
Some People Are Idiots
I've been sick for the past week and a half. The whole stay in bed, drink lots of tea, use entire rain-forest's worth of tissue paper deal. It sucks. I've even lost the ability to speak. At least I can still write.
I've tried every remedy conceived by those old hags that
live alone in the middle of some dark forest. You know the ones. It turns out that lemon really is a good anti-bacterial substance, and so is garlic. That's science. I happen to have a wife in the chemistry business, you see. The undisputed winner in the "your grandmother says its good" category of medicine is without a doubt a bit of whiskey. Well maybe most grandmothers don't recommend it, but there's nothing like 40% alcohol to burn all the nasty germs. Sure, there might be some collateral damage, but at least the germs will die. As the song goes, "Just a tea-spoon of whiskey helps the cough go away, helps the cough go away, in a most delightful way!".
So I've been thinking about all the idiots who say pearls of wisdom like:
I've tried every remedy conceived by those old hags that
live alone in the middle of some dark forest. You know the ones. It turns out that lemon really is a good anti-bacterial substance, and so is garlic. That's science. I happen to have a wife in the chemistry business, you see. The undisputed winner in the "your grandmother says its good" category of medicine is without a doubt a bit of whiskey. Well maybe most grandmothers don't recommend it, but there's nothing like 40% alcohol to burn all the nasty germs. Sure, there might be some collateral damage, but at least the germs will die. As the song goes, "Just a tea-spoon of whiskey helps the cough go away, helps the cough go away, in a most delightful way!".So I've been thinking about all the idiots who say pearls of wisdom like:
"All You Need is LOVE"
or perhaps:
" is a great book, right up there with such classics as "Ubik
" or "The Three Stigmata of Palmer Eldritch".
"Live Every Day As If It Were Your LAST"
Oh, and finally, "The Wind-Up Bird ChronicleYou see, people who live everyday as if it were their last would never bother going to school, have children or advance mankind. It's like one of those governments in those democracies which have elections every two years. They never accomplish anything, because they are only thinking about today. Life is great because we don't live each day as it were our last.
Thursday, November 20, 2008
Brandon Sanderson, The Hero of Ages and Marketing
The story of how I ended up reading The Hero of Ages
is an interesting example of successful marketing in the 22'nd century.
I first heard about Brandon Sanderson after hearing that Robert Jordan passed away. I've read most of the Wheel of Time books several years ago, and occasionally checked up on the status of the final book in the series. That's how I learned that Robert Jordan died before being able to complete the last book, and that an author called Brandon Sanderson had been selected to write the book in his place.
A quick google search led me to the surprisingly good website of Brandon Sanderson. There I found a free ebook of the work-in-progress version of the upcoming Warbreaker book. I read this book and liked it, which made me want to read more books by Sanderson. On his website, he also posted the first couple of chapters of The Final Empire
, which I also read and liked. I searched for the book on various ebook sites (since shipping to Israel from amazon is expensive and takes a lot of time), and couldn't find it, so I left it alone.
Fast forward several months later. A random check in fictionwise showed me that the Final Empire was finally released in ebook format, so I immediately bought it and downloaded it to my palm. I read the book in a couple of frantic-your-priorities-are-up-side-down days. As soon as I finished reading the book, I ordered the second volume, The Well of Ascension
. I just couldn't wait for it to appear in ebook format. Needless to say, I finished reading this book in no time as well.
I was now hooked, and couldn't wait for the third book to come out. I felt like I was 8 again and couldn't wait a whole week for the next episode of The Transformers. That's why I escalated things up, and ordered the hardcover (!) edition of the third and final book as soon as it came out.
The fact that I kept coming back for more, even to the point of ordering hardcover edition, (which is not something I generally do), just shows how good the books are. But the point is that none of this would have happened without plenty of free material on the author's website. At least on my part, this payed of.
I first heard about Brandon Sanderson after hearing that Robert Jordan passed away. I've read most of the Wheel of Time books several years ago, and occasionally checked up on the status of the final book in the series. That's how I learned that Robert Jordan died before being able to complete the last book, and that an author called Brandon Sanderson had been selected to write the book in his place.
A quick google search led me to the surprisingly good website of Brandon Sanderson. There I found a free ebook of the work-in-progress version of the upcoming Warbreaker book. I read this book and liked it, which made me want to read more books by Sanderson. On his website, he also posted the first couple of chapters of The Final EmpireFast forward several months later. A random check in fictionwise showed me that the Final Empire was finally released in ebook format, so I immediately bought it and downloaded it to my palm. I read the book in a couple of frantic-your-priorities-are-up-side-down days. As soon as I finished reading the book, I ordered the second volume, The Well of Ascension
I was now hooked, and couldn't wait for the third book to come out. I felt like I was 8 again and couldn't wait a whole week for the next episode of The Transformers. That's why I escalated things up, and ordered the hardcover (!) edition of the third and final book as soon as it came out.
The fact that I kept coming back for more, even to the point of ordering hardcover edition, (which is not something I generally do), just shows how good the books are. But the point is that none of this would have happened without plenty of free material on the author's website. At least on my part, this payed of.
Friday, October 31, 2008
Languages
"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
Edsger W. Dijkstra (SIGPLAN Notices, Volume 17, Number 5)
Edsger W. Dijkstra (SIGPLAN Notices, Volume 17, Number 5)
If you think about it, and please do just that right now, then you'll probably notice that you use your native language to facilitate the thinking, at least to some extent. Taking this observation to the next step, how much does our native tongue influence our thought patterns, and how we perceive the world around us?
This is not a new question. There's even a theory in linguistics which studies this question, called the Sapir Wohrf hypothesis. In fact, George Orwell, in his classic book "1984", has a whole new dialect, "Newspeak", introduced by Big-Brother to aid in preventing "thoughtcrime". This imaginary language is unique in that it attempts to reduce its vocabulary, thus intending to limit thinking patterns.
A couple of years ago I heard a lecture (in hebrew) by Physicist turned Computer-Scientist, Prof. Naftali Tishbi, on some of the research he's conducted on languages and their affect on thought (and vice-versa). Since then, the subject has been sitting in some corner of my brain.
A couple of examples:
- When a procedure that I already know is coined, I can understand and use this procedure much more easily. For example, in Origami, the term "Double Rabbit Ear" allows my brain to much more easily choose an appropriate course of action, rather than just remembering some sequence of folds I've done before. In programming, that's exactly what Design Patterns do. I've used the Factory pattern before, but coining it made it more accessible cognitively, and it's now much more easy to notice when this pattern is appropriate.
- When attempting to solve a programming challenge, the choice of language affects the solution. This is taken to a very interesting extreme in LISP, where the first step to solving a problem is to create a new language tailored specifically for it.
But it is much deeper than this. A programming language affects how we even think about problems. Knowing several programming languages is important in developing our own minds and allows us to better think about problems. This is not new. Edsger W. Dijkstra already talked about this in his excellent 1972 lecture, "The Humble Programmer".
So, my resolution for the following year is to learn two new languages. While I think I know enough of Perl to get what I want done, I'm no expert in it, mainly because I don't like too many $ and too few letters. That's why I'm going to spend the next year studying Python. And I intend to really study it, inside-out.
I have a full-time job, a wife, some non-programming hobbies, an obligation to write a computer game, but I intend to follow through.

The other language I'll be learning is Japanese, by the way.
Monday, August 4, 2008
Schedule
Jeff Atwood wrote a very interesting blog post where he postulated that quantity is more important than quantity. From my point of view, this is an interesting extension of the fact that the only way to learn is by doing. Especially if this means making mistakes.
In a prior post, Jeff wrote that the same holds for blogging, and that one should make a commitment to uphold a schedule. Therefore, I will now declare that:
In a prior post, Jeff wrote that the same holds for blogging, and that one should make a commitment to uphold a schedule. Therefore, I will now declare that:
I will post at least one post every week
And no, this post doesn't count.
And no, this post doesn't count.
Subscribe to:
Posts (Atom)