NOTE: Being a techie and an engineer, I’m often asked questions about how things work. These types of questions are the best, because as you might imagine, engineering types are generally obsessed with how things work. So, I have created a new category on my site here entitled “How Does it Work?”
The first post in this new category is the answer to a question that a friend just asked me the other day: How does a microprocessor actually work?
Everyone nowadays is familiar with microprocessors. Everything now uses a processor of some kind: computers, MP3 players, cell phones, washing machines, food processors, and even some electric toothbrushes!
One question I get asked a lot is: how do these processors actually work? Everyone knows that there is a thing called a microchip, and that it has transistors. But how do you go from a bunch of ones and zeros to a video playing in the web browser on your cell phone? I hope to explain here in very simple terms how a microprocessor works without getting too technical – and therefore too boring!
Read more…
Scottie How Does it Work? processor
Those of you with hard water have no doubt encountered one of the most annoying problems ever: descaling appliances.
Sure, calcified bathtub superscum is also seriously annoying, but there are plenty of products out there that will magically descale and de-scum your bathtub with a few sprays and some waiting. It’s the appliances that are particularly annoying to clean – appliances like coffee makers and water distillers.
There are a number of different products available for removing rock-hard mineral deposits from your gizmos, but how do you know which one to use to make your life as easy as possible? You don’t! Otherwise, what the heck are you reading this for? But now you will know soon enough…
Read more…
Scottie Do-It-Yourself acid, descale
The jQuery JavaScript library is a seriously beautiful thing. With a code base that is much smaller than Prototype + Scriptaculous, jQuery can be used on a web site do a whole lot of fancy AJAX stuff with syntax that is surprisingly easy.
At first, jQuery doesn’t look easy. In fact, it looks downright scary. But once you actually dive in, you find that the water is warm and inviting indeed!
If you’ve used jQuery, there is undoubtedly one problem you will encounter: How do you insert a delay between special effects like fadeIn() and fadeOut()??
I found several answers to this question on the web, but I decided not to use any of them. Instead, I decided to leverage jQuery’s built-in callback functionality to get a “delay” in one clean, simple, and super easy step. But, as always, there is a catch…
Read more…
Scottie Programming jquery
If you’re still using an inkjet printer, you have my sympathies. If you’ve taken the plunge and purchased a laser printer, you’ll probably want to keep it in tip-top shape for years to come. After all, they’re a lot cheaper than they used to be, but not that cheap!
Most printer problems are caused by gummed up inner workings. A lot of people simply chuck their malfunctioning printer in the trash can and buy a new one. With the economy the way it is, that isn’t the best move for most of us.
Lucky for you, it’s actually surprisingly simple to clean out a laser printer and make it work like new!
Read more…
Scottie Do-It-Yourself, Gizmos printer, repair, rubbing alcohol
Many people these days use a Wi-Fi (IEEE 802.11) router, or they have a broadband modem with built-in wireless. It’s amazing to me that in this supposedly “high-tech” and “high-security” age, many people still are completely unaware just how wide open their home network really is.
With a Wi-Fi modem, usually your provider will be smart enough to lock down your wireless connection for you. But if you bought a wireless router or access point and set it up yourself, there are a few things you should know to keep others from “stealing” your connection and using it for nefarious purposes…
Read more…
Scottie Computers, Networking network, security, wifi
Say you were using the active_record_store for sessions in Rails 2.2, and you added your own custom column(s) to the default sessions table in your database. You might have done so because you wanted to add, say, the user’s id number to each entry in the sessions table. This would let you do things like quickly and efficiently delete a user’s session.
Unfortunately, when you upgrade to Rails 2.3.2, your session hack will be seriously busted. Cookies will work great, and so will the standard session scheme, but your custom column in the sessions table won’t be updated. Worse yet, you’ll get a lovely error when you do things the old way. The problem is due to 2.3.2′s new “lazy sessions“. In short, unless a session is accessed, it doesn’t load all the session handling stuff. If you don’t want to use sessions, you don’t have to turn them off anymore.
So, that’s great, but your custom sessions table is still broken. There are no solutions posted anywhere that I could find, so I took the liberty of figuring it out myself. Here’s what to do…
Read more…
Scottie Programming rails, ruby
Recent Comments