- January 2006 (1)
- January 2007 (1)
- July 2007 (8)
- August 2007 (3)
- September 2007 (3)
- October 2007 (2)
- November 2007 (3)
- January 2008 (5)
- February 2008 (4)
- March 2008 (1)
- April 2008 (5)
- June 2008 (3)
- July 2008 (2)
- August 2008 (1)
- September 2008 (6)
- November 2008 (3)
- December 2008 (1)
- January 2009 (4)
- March 2009 (1)
- April 2009 (14)
- May 2009 (9)
- June 2009 (7)
- July 2009 (6)
- August 2009 (4)
- September 2009 (4)
- October 2009 (2)
- November 2009 (23)
- December 2009 (23)
- January 2010 (4)
- February 2010 (3)
December 2009
Bruce Schneier on Aviation Security
Tue, 12/29/2009 - 18:21 | by KrisComputer security expert Bruce Schneier has a really nice opinion piece on CNN:
One could wonder whether a computer-security expert is qualified to write about aviation security or national security, but what he says makes a lot of sense.
Despite fearful rhetoric to the contrary, terrorism is not a transcendent threat. A terrorist attack cannot possibly destroy a country's way of life; it's only our reaction to that attack that can do that kind of damage. The more we undermine our own laws, the more we convert our buildings into fortresses, the more we reduce the freedoms and liberties at the foundation of our societies, the more we're doing the terrorists' job for them.
Ten New Year's Resolutions for Everyone
Tue, 12/29/2009 - 15:08 | by KrisBeing the arrogant lummox that I am, I've taken it upon myself to make a list of ten New Year's resolutions for everyone to follow.
- Be a better parent. Make time to spend with children (even if you have no children of your own).
- Be a better spouse. Are you the partner you promised you would be?
- Be a better friend. Your life isn't all about you. Reach out to others.
- Be a better citizen. Educate yourself about what's going on in your city, in your nation, and in the world. Ask questions. Respect those who disagree with you.
- Take care of your health. Prepare healthy meals, get some exercise, take your prescribed medications, get a physical exam and vaccinations.
- Put more into your work, but don't let your work take anything out of you.
- Correspond with people. This doesn't mean forwarding e-mail jokes, posting your status on a web page, or ranting about what some politician has done. You need to write about meaningful things, and carefully read what others have written.
- Examine your beliefs. How did you get them? What are they based on? Do they still make sense to you? Can you imagine what it would be like to hold different beliefs? Talk to someone who does have different beliefs.
- Get rid of what you don't need, literally and metaphorically.
- Relax more. You really do have the time.
Now you'll have an answer when annoying people ask you what your resolutions are.
Detecting Bullshit on the Internet
Tue, 12/29/2009 - 13:10 | by KrisIt's amazing what people will believe. At least once a week, I'm forwarded a piece of information from a seemingly intelligent person that seems fishy. Obama is not a US citizen! Obama is a Muslim who hates Christians! The Department of Homeland Security is setting up death camps! Eat whatever you want and still lose weight! Cancer cured by prayer! Etc., etc., etc.
It is usually very easy to debunk these claims:
- Is this story being reported by any reputable news sources? If not, you should be skeptical.
- Try Googling the first sentence or two of the story. This often brings up pages that demonstrate the story to be a hoax.
- Try searching websites like http://snopes.com/, http://www.factcheck.org/, or http://skeptoid.com/, that have smart people who investigate suspicious claims.
For some stories, a tiny bit of research and critical thinking quickly leads to the conclusion that they are bogus. But it amazes me that people accept these stories without even considering that they may be untrue. Their "bullshit detectors" just don't work. They accept any negative story about people they don't like, and any positive story about people they do like. They reject mainstream media and other reputable sources in favor of quacks, cranks, and conspiracy theorists.
It is very easy to accept stories without question if they fit your existing beliefs, but we must always be on guard against such acceptance.
The first principle is that you must not fool yourself — and you are the easiest person to fool.
— Richard Feynman
Carl Sagan, in his book The Demon-Haunted World, presented what he called his "Baloney Detection Kit". It's a simple set of guidelines for testing the believability of assertions and arguments. If you haven't read it, please do, and apply it both to new stories and to your existing beliefs.
And, please, stop sending me this crap.
The Programs
Sun, 12/27/2009 - 09:26 | by KrisThe following subsections each present a simple JavaScript example program. They proceed roughly in order from simple to complicated.
For each program, there will be some commentary describing small sections of the code. There will also be suggestions for making changes to the programs.
Setting Up Your Text Editor
Sun, 12/27/2009 - 09:23 | by Kris[This page will describe how to set up a text editor.]
Setting Up Your Work Folder
Sun, 12/27/2009 - 09:22 | by Kris[This page will describe how to set up a work folder.]
Setting Up Your Web Browser
Sun, 12/27/2009 - 09:21 | by Kris[This page will describe how to set up the web browser.]
Setting Up
Sun, 12/27/2009 - 09:19 | by KrisThe following subsections provide steps you should take to ensure that you can download and run the programs, and make modifications to them.
Web Browsers and Web Servers
Sun, 12/27/2009 - 09:08 | by Kris[This page will describe how web browsers and web servers work.]
Background
Sun, 12/27/2009 - 09:03 | by KrisThe following subsections of the book describe the underlying technologies for JavaScript-based web pages. They briefly describes how web browsers and web servers work, what HTML is, what CSS is, what JavaScript is, and so on. The intent is to provide a little bit of background information for readers who are unfamiliar with web technologies.
This is not a tutorial. The purpose is just to explain what each piece does and how they fit together. Links are given to other sources of information where readers can learn more.
If you already know what HTML, CSS, JavaScript, and jQuery are, then you can safely skip this section and move on to the Setting Up section.
Introduction
Sun, 12/27/2009 - 09:00 | by KrisWhen I was a kid, in the early 1980's, I got started with computer programming by typing in the programs from David H. Ahl's BASIC Computer Games. I spent many hours typing in those little programs, playing them, and then modifying the code to customize the games to my liking. I later moved on to more sophisticated programming languages, but that early exposure to simple examples of BASIC programming is what got me started.
Today, we're all surrounded by programmable computers, but in some ways it is more difficult than it has ever been to get into programming. Everything seems so complicated. There are so many programming languages to choose from, so many development tools to choose from, and such a wide variety of books, tutorials, and other information available on the Web that it can be overwhelming to someone who wants to get started.
This is an attempt to provide a modern analogue to BASIC Computer Games. Here, I present a set of simple JavaScript programs that run in a web browser. It is my hope that people interested in programming can study them, modify them, and then move on to more complicated applications.
All you'll need is a modern web browser, a text editor, and some time.
Simple JavaScript Examples
Sun, 12/27/2009 - 09:00 | by KrisThis book is a collection of simple JavaScript programs that run in a web browser. It is intended for people who want to learn about web programming.
This book is still under development.
Are Web Apps the new BASIC?
Mon, 12/21/2009 - 21:38 | by KrisI often wonder how kids today get into programming. When I was a kid, and got my first computer, I spent a lot of time typing in the programs from David Ahl's BASIC Computer Games. After typing in the code for the games and playing them a bit, I'd start changing them. Eventually, I got into 6502 assembly language and higher-level programming languages, but that early exposure to a bunch of simple BASIC programs is what got me started as a coder.
Today, kids are surrounded by programmable computers, but few of them learn how to write code. Most kids are no more interested in programming a computer than they would be in rebuilding a car's engine. I don't see a lot of simple projects like those in Ahl's book that they can play with and start hacking on. How does a kid get started?
There are programming environments that are intended to teach kids programming (Scratch, Alice, etc.). But use of those is not widespread, and I question their usefulness. All the good programmers I know started with something primitive, like BASIC, Fortran, Perl, or command.com. I wonder if somebody can really learn how computers work by working with fancy 3D "authoring environments" like Alice and Squeak.
It's occurred to me that web applications might be one way to get into programming. Web browsers are as ubiquitous as BASIC was in the 80's. It's relatively easy for a kid to set up a web site with Drupal or some other off-the-shelf CMS, and then start customizing it. All they need is Notepad and an Internet connection. They learn a little CSS here, a little JavaScript there, and pretty soon they'd rather be coding than playing games.
Is there a web-app equivalent to BASIC Computer Games? If not, there should be.
Playing Catch-Up
Mon, 12/21/2009 - 10:12 | by KrisEarly in my career, I prided myself on my ability to absorb a lot of information and stay up-to-date on programming tools and techniques. I learned C++ before any of my colleagues did, and knew more about its intricacies than they did. I implemented ActiveX control containers before most people knew what "ActiveX" or "COM" was. I dug into CORBA. I played around with Java 1.0.
In short, I liked being an expert on new stuff. I enjoyed being on the bleeding edge. I liked being able to answer everyone's questions.
However, now I find myself on the other side of things. I'm bringing myself up to speed on some relatively "old" stuff: Java, JavaScript, and Cascading Style Sheets (CSS). It sometimes feels like I'm the only person who doesn't already know this stuff, and I'm not comfortable being the newbie.
There are benefits to jumping on the bandwagon late. For example, JavaScript actually works now, and most people have browsers with decent implementations of DOM and CSS. A lot of that J2EE silliness has quietly faded away. I can take advantage of lots of libraries written by experienced people, and there are plenty of people who can answer my questions.
Still, I'm nagged by the feeling that I'm behind, and won't ever be able to be one of the foremost experts or significant contributors to the communities. Maybe someday I'll be mature enough to accept that, but I'm not there yet.
Are Web Developers Real Programmers?
Wed, 12/09/2009 - 08:23 | by KrisThe native-vs.-webapp hubbub from a couple of weeks ago got me thinking about why "web developers" are looked down upon by "real programmers."
Quick-and-Dirty Guide to QUnit
Sun, 12/06/2009 - 17:07 | by KrisI'm playing around with JavaScript in my spare time, and have started creating a web app. As I usually do, particularly when learning something new, I am using a test-driven development approach. I looked at a few JavaScript unit-testing frameworks, and decided to go with QUnit, the testing framework used by the jQuery project.
QUnit isn't too hard to set up or use, but my unfamiliarity with JavaScript, jQuery, and related things meant it took a little more work than it should have. A few out-of-date QUnit tutorials on the web made things worse. So, here is a quick-and-dirty QUnit tutorial that might be helpful for others who are the same boat that I was in.
Stack Overflow Careers
Sun, 12/06/2009 - 09:38 | by KrisFinding a good job, or finding good employees, has always sucked. The guys at Stack Overflow are trying to make it suck a little less with their new service: Stack Overflow Careers.
What differentiates Stack Overflow Careers from all the other job-board web sites is that candidates' CV's are linked to their Stack Overflow accounts, so an employer can get a feel for how smart a person is by checking their SO reputation and reading their questions and answers. They are also trying to avoid a lot of the annoyances that plague other job-search sites. It is also hoped that the association with Stack Overflow will attract the best candidates and employers.
I've set up my CV: http://careers.stackoverflow.com/kristopherjohnson. The process was pretty easy.
It costs $29 to enter your CV into the employee-search database, and employers have to pay a pretty steep price to search it. I think that's a good thing; it keeps things serious. (Note: You can create a public CV for free, but it won't show up in employer's searches.)
I'm not actively looking for a job, but if anyone wants to pay me huge gobs of money to play with cool stuf, I'm definitely available.
Not Quite NaNoWriMo Review
Tue, 12/01/2009 - 05:38 | by KrisLast month, I committed to do a lot of writing. Let's see how I did.
I was going to write one blog entry per day. I actually did 22 entries during the 30-day month of November. Not 100%, but not too bad.
My other commitment was to get a new iPhone app into the App Store. That didn't work out. I did work on an app, but as it progressed, I came to the conclusion that it wasn't worth finishing. So instead of spending that time working on an app nobody would use, I spent time learning about JavaScript.
So, I didn't really meet either commitment, but I'm OK with that. I don't mind letting myself down.
Recent comments
4 days 1 hour ago
1 week 3 days ago
1 week 3 days ago
1 week 4 days ago
1 week 5 days ago
3 weeks 3 days ago
3 weeks 5 days ago
3 weeks 6 days ago
5 weeks 5 days ago
6 weeks 1 day ago