Nick Mudge
1 June 2009
When I first started building websites I learned Javascript and the DOM and that's what I programmed with for client-side browser functionality. When AJAX began to be more broadly known I wrapped my own functions around the XMLHttpRequest object and programmed AJAX functionality. When I began reading more in depth about Javascript, such as reading Douglas Crockford's articles and watching his videos, I became more interested in Javascript and wanted to programming in it more. This is about the time that various Javascript libraries began to become popular and I began to feel some pressure about using them. These new libraries conflicted with my interest in Javascript because I wanted to write in pure Javascript because I liked it. Javascript is so powerful and flexible that it seemed that these libraries could mutate the DOM and Javascript into something different. They became their own distinct things made up from the DOM and Javascript. To illustrate this, the MooTutorial (tutorial for the MooTools library) says this: "With MooTools in your environment, you still write Javascript when it comes to basic syntax, but to a great extent you are NOT writing Javascript anymore; you're writing MooTools." But overall I think the Javascript libraries are a good thing and make sense. There are troubling DOM browser incompatibilities, and the DOM doesn't make it easy to do many things. The libraries bring Javascript and the DOM together into higher cross-browser abstractions to make things easier to do, less verbose and more elegant. These days if I'm going to be doing much Javascript programming I'm going to use a Javascript library. Aren't these libraries in a way acting like a higher-level language based on a lower-level platform specific assembly? So I guess that's why to use a Javascript library these days. Who would write a full blown user app in assembly? Edit: Of course the difference between real assembly and Javascript is that Javascript is interpreted up into abstractions which are then used and interpreted. A high-level language is often compiled down into an assembly (or intermediate) language which is then assembled into machine code.
Comments (1)
22 May 2009
10 May 2009
I just watched a few of the talks of the very recent Ruby on Rails conference. They are great. I really enjoyed Robert Martin's talk What Killed Smalltalk Could Kill Ruby, Too and David Heinemeier Hansson's talk Rails 3 ...and the real secret to high productivity.
25 April 2009
I'm a pretty good news junkie, particularly about programming stuff on the web.1 Every once in awhile I really do come across some great stuff. I came across a great piece of material today. Now imagine this: You are a programmer and you love programming and you always want to improve your knowledge and ability as a programmer. It's a hot, boring afternoon and you start wondering to yourself about this. And then you have an interesting idea. What if you just out of the blue email some of the best known great programmers in the world asking them the most important questions you can think of about programming? You are just some guy on the Web that barely knows English, so why not? Polish blogger and programmer Stiff did this and posted the questions and answers on his blog. I love this comment: That's just awesome. I can't believe no one before had this idea. I will bookmark this and study it excessively later. Stuff I Think is AwesomePeter Norvig dislikes Windows, Mac, and Linux. I wonder what operating system he uses. Steve Yegge, Linus Torvalds, David Heinemeier Hansson, Peter Norvig and James Gosling were self-taught in programming even if they studied it in school. Steve Yegge and Linus Torvalds stress communication skill as important for a programmer to have. Math and physics aren't necessarily used that much in programming but are good to know. Steve Yegge _really_ loves math and physics. Tim Bray thought he was going to be a math teacher. Linus Torvalds says that operating system and compiler work is about as close as you can get to playing with hardware without actually designing or building it yourself. Guido Van Rossum uses vi and emacs. All of them except Peter Norvig like and use Unix or Linux.. Steve Yegge said: "Great programmers learn how to program their tools, not just use them." Linus talks about programming his tools. Linus Torvald's favorite programming book is the classic Kernighan & Ritchie The C Programming Language. Bjarne Stroustrup's favorite programming book is also K&R. Programming the 80386 is the hardware/computer architecture book Linus used when he started building Linux. Both Structure and Interpretation of Computer Programs and Programming Pearls were mentioned twice as favorite programming books. Bjarne Stroustrup likes The Dixie Chicks and Beethoven. 1My programming bookmarks
19 April 2009
Newsconomy is a user-submitted news website like reddit.com or Hacker News and a bookmarking website like delicious.com. But it is also different and this post explains how it is different. Newsconomy keeps submitted URLs unique. If someone posts a URL to an article, another user cannot then submit that same URL. The way Newsconomy handles this is a major difference from other websites. Below I show how reddit, delicious and newsconomy handle duplicate URL submissions. reddit doesn't let a user submit a URL to a subreddit if it already exists in that subreddit:
deliciousOf course in delicious duplicate URLs or bookmarks are a major part of the website. delicious keeps track of how many people bookmark items to determine their quality or popularity. The number 72 in the delicious bookmark below is how many times people have bookmarked the item (submitted or saved the URL for their own account in the website).
NewsconomyHere's how Newsconomy handles a duplicate submission:
Buy the item if you want it? WTF?Notice the purple "Buy" link below the title of the item. If you come across an item that you find interesting or like and it already exists in Newsconomy you can buy the item. When you buy the item it moves from the account of the person you bought it from into your own account, and you now have powers over that item. It's like the item is now yours, in the mini world of Newsconomy, and nobody else can have it, unless they meet your price. That's the idea anyway. But Why on Earth Would Somebody Want to Do This?With or without the trading aspect of Newsconomy, it serves as a perfectly good bookmarking website or news website. The trading part of it just serves as a way to make it a little more fun. It is a different way to exchange items between users and show what people are interested in. Someone who might want to try something different might want to try this. Karma Me MarmaNewsconomy doesn't have karma, or some sort of points system. It has something called lambda and it has trading histories. Newsconomy's monetary unit is called lambda and it is what users use to buy items. On the site the λ symbol is a symbol for lambda. Like the $ sign is for dollars. What to Do With LambdaEach user automatically gets a certain amount of lambda when they create an account. This amount changes. Yesterday a new user automatically got 10 lambda. Today the amount is 50.
How to Get Lambda
Note: Any cheating will be detected and all accounts of a cheater will be deleted and the items of the accounts will be given to joemama. How to Find Interesting ItemsCheck the homepage. Right now anytime an item changes ownership it is put at the top of the homepage. New submissions and newly purchased items are put at the top. This may change in the future for new ways of pushing up interesting content. Every item has a "Trading History". The history shows every person who has purchased an item and how much they paid for it or if they were the original submitter. Every item shows how many owners it has had. This information provides good indicators of how interesting an item is. Here's how to see the history of an item: Notice the link "Link" in the image below. Imagine clicking on that. Also notice that the Trading History is 6.
After clicking on that link you are shown the individual webpage for that item that shows its history: More InfoI've used Newsconomy to create a list of links to posts/articles about Newsconomy. More information can be found in those links: http://newsconomy.com/tag/newsconomy
9 April 2009
Every once in awhile I have an interesting idea of some application or software program I'd like to create, but I almost never have the time to immediately do it, and then sometimes later I notice that I forget what the idea was, or why I wanted to do it or what was great about it. So I'm thinking, why don't I just write my ideas down on my blog? Then I could always look back at my blog posts for any ideas when someday I really have time to do something. And plus, it would be fun to write them down here and of course hearing what other people think is always great. I would worry about someone taking my ideas but I've grown to the idea that if you can come up with good ideas in general then ideas aren't that important, what really matters is doing something with them. Any helpful idea I might mention that someone uses to carry through with something deserves full credit and respect for what they create, and of course I'd want to hear about it because it would validate my ideas, and of course I enjoy knowing that I had some slight participation in some new creation. So I'll tell my first idea which was my first idea for a Web application, and I'll tell its story. Way back when I didn't know I was going to be a programmer for a living I had a great idea called Democranet. Basically the idea was that there would be this website www.democranet.com that would contain political articles. Anybody could submit articles and people could vote on whether they agreed with the articles or not. Through a democratic process the website would push up and show the ideas in the world that people cared about most and how people thought the world should be and how it should change. Democranet = Democracy + Internet. I had gotten the idea from reading the book Ender's Game. Some of my ideas of functionality of www.democranet.com were similar to how reddit.com and digg.com work, except the content would be on www.democranet.com instead of linked to all over the web. I think Reddit.com and Digg.com were way less known when I first began working on this, in 2004. Anyway, I was so excited about this idea and this website. But I had no one to build it for me and I didn't know anything about web programming. So I decided to learn how to do all the computer technical work myself. A friend recommended that I get a book on HTML, Javascript and PHP. So that's what I did and that's how I started. I had taken a C programming class in college and knew something about programming (I loved Qbasic in school.) In the process of learning how to build this website and building it I began to realize that I didn't like politics very much, and that grew more and more. After some time I realized that I really liked learning and building the website but that I didn't like the idea of the website anymore. So that was the end of that. I have the old code for it somewhere. I have a visual redesign of the site I was going to implement that is still in HTML here: http://webdescript.com/redemoc/ The Democranet project has been gone for a long time, but it has an issue connected to it that has lingered. At the time I bought the domain names democranet.com, democranet.org and democranet.net. These are really great domain names and I have no idea what to do with them. If you know of anyone that might be interested in buying them for a million dollars, please let me know. What came out of Democranet was that I found that I really liked web programming and it gave me a project to learn web programming with. I eventually got a full time web programming job, which was fantastic for me. Stay tuned for the next idea.
14 March 2009
From Daniel Tenner's post How to recognise a good programmer: Positive indicators:
Sounds like the kind of programmer friends that are great to have.
7 March 2009
Last week Marshall Beddoe organized the first Bay Area Haskell meeting in San Francisco. It was great. I think there were about 20 people there. There's now some talk on the Bay Area Haskell Users Group mailing list (which is brand new, and a spin off from the Bay Area Functional Programmers mailing list) about talks for future Haskell meetings. Dan Piponi mentioned doing a talk on monoids.
7 March 2009
Last week was my last week working at Minnick Web Services, working on and building websites for magazine publishers (and working on eBook registration systems). It was great. I worked there for close to two years. The final large project I had been working on (with a few other people) for quite awhile launched last week. It is the redesigned www.gamasutra.com. News story about it. I bought a car today, a 1994 Honda Civic Del Sol. I actually owned the car for four years, and then sold it to my dad who has had it for three years, and now I'm buying it back. I haven't had a car for close to three years. It is definitely nice to have one again. I have a new full time job working for Inductive Automation/Calmetrics. Industrial automation is a whole new industry for me to learn about and get involved in. I am excited about it. My job starts on Monday. I will be doing programming of course. And I got a new cell phone:)
24 February 2009
Charles Petzold wrote the book CODE The Hidden Language of Computer Hardware and Software which I read and think is very informative. I find his post about Visual Studio interesting: Does Visual Studio Rot the Mind? From the post: Visual Studio can be one of the programmer's best friends, but over the years it has become increasingly pushy, domineering, and suffering from unsettling control issues. Should we just surrender to Visual Studio's insistence on writing our code for us? Or is Visual Studio sapping our programming intelligence rather than augmenting it? This talk dissects the code generated by Visual Studio; analyzes the appalling programming practices it perpetuates; rhapsodizes about the joys, frustrations, and satisfactions of unassisted coding; and speculates about the radical changes that Avalon will bring.
22 February 2009
Andrew Gwozdziewycz wrote a post about PHP 5.3's new feature that allows closures in PHP for the first time and goes on to explain it and how to use it.
I think this is really exciting for PHP programmers who have wished a more functional life. (Like me.) Andrew also wrote a library that uses the new closures functionality to create a lot of common higher order functions and functionality. From his post: Fn.php is an attempt to define lots of useful higher-order functions to PHP, and fix some of the things that are inconsistent with the others. Fn.php already supports the things in PHP that already exist, but adds foldr, compose, zip, andf, orf, not, any, every, curry, I, K, S, flip and a new short hand way to define functions with strings.
22 February 2009
I just watched a very interesting interview of Marc Andreessen on Charlie Rose. Marc Andreeson is one of my favorite technology people. I was lucky to meet him and have a short conversation with him at Startup School last year.
A couple things I didn't know:
Evan Williams is the guy who started blogger.com, but did you know he also started twitter.com?
4 February 2009
I loved this presentation:
Damien Katz on his experience developing CouchDB.
1 February 2009
I wrote a small PHP caching system and I'm releasing it here under a BSD open source license. SimpleCache is a file-based caching system that is used to cache dynamically generated content, as from a database and/or heavy processing. It's use is similar to the caching system that is part of the PHP Smarty templating system (except Smarty caches HTML output, whereas SimpleCache caches whatever kind of data you want to cache). SimpleCache is very flexible in that you can cache as finely grained as you want, you can cache whatever data you want, is very easy to install (simply include one file into your PHP files) and is easy to insert into your code. It requires PHP 5. It does not cache compiled intermediate PHP code, like Alternative PHP Cache does. It does not cache data to memory, only to files. SimpleCache is here. Instructions on how to use it are in that file.
20 January 2009
After Apple and Microsoft's ad campaigns, "I'm a Mac" and "I'm a PC", the Linux foundation is now holding a video contest for "I'm Linux". Check out the press release.
19 January 2009
A little while ago a friend asked me what kind of programming I was interested in. I ended up explaining the difference between system programming and application programming: In application programming programmers build applications. Application programs include websites, video games, iPhone applications, Microsoft Word, Microsoft Excel, Web browsers and other programs that people use for entertainment, communications, accessing information, organizing, and getting work done. Application software interacts with people or users. Systems programming is creating technology that programmers use to build applications. In order for an applications programmer to build an application, he needs an operating system, a programming language, and other tools to get the application built, tested, and working. System programming includes creating and working on:
Software exists in layers.
Another way of looking at it:
17 January 2009
I kind of realized for myself how to debug software. The bug will be at the very end of where a program is working correctly. So one merely needs to test the execution of code from the beginning of execution going forward until one finds an error. I've often said, "follow the logic". By this I mean test or examine the code from the beginning of execution until you find the error.
So this is how a person could debug:
A faster way to find an error when you have no idea where it is, could be like this: Now you have the second half of code. Cut the second half of the code in half. Now test the first half of this code. If this code works, then you know the error lies in the second half. So cut this second half in half and test this first half and so on. The whole idea is to zero in on the bug by eliminating code that you know works. When you find a code half that doesn't work, then cut that half in half and test the first half and so on until you find the exact bug. This halving of code method is the same idea of the best way to guess a number out of 100. You guess 50 and someone tells you if the number is higher or lower than that. If the number is higher, then you guess 75, if the number is lower, then you guess 25. You continue cutting the numbers in half until you get the right number. If you were guessing a number out of a million, it would only take you 20 or less guesses to get the right number every time. The best method I have found of finding a bug is to eliminate working code so that all that is left is the bug. And the bug will be at the very end of working code. The skill and imagination of locating a bug in this way is figuring out how to cut your code in half and get your code reporting to you the right kind of errors. In my experience, there have always been ways of getting code to report to you errors. This method of locating a bug is also a good method of finding a bottleneck when there is a performance problem. Time the first half of code and then second half of code. Take the slower half of code and cut it in half and time those halves to find the slower half and so on.
16 January 2009
Zune
Year 2038 Problem
Real World Haskell
Why and Potion
Javascript Games
15 January 2009
Guido van Rossum, creator of Python, is writing some great stuff about the design, basic principles, history and summary information about Python.
Here's some links:
1 January 2009
I haven't written a blog post in awhile. Just wanted to drop a note that I'm alive and kicking. I'm around. I'm spending my blog writing time rewriting my blog sofware. I have a busy schedule, but I'll be getting my new blog done and I'll be blogging a lot more. |
|