Archive for the 'Technology' Category

The complexity of simplicity

Posted in Technology on May 7th, 2010

Note: Feel free to correct my science, or to expand on points that I’ve glossed over.

A neuron fires.  An imbalance in electrical charge and concentration of particles moves through a tunnel of molecules like a ripple in a puddle.  Reaching the end, it triggers the release of chemical signals which traverse a small gap and set off the process again in the next neuron.  Millions of times this occurs, transferring the signal down the brain stem, through the arm and hand, finally reaching a group of cells in the finger.

Those cells then carry out a chemical reaction with simple sugars and oxygen that are passing by in the bloodstream.  Oxygen which was freed from carbon dioxide by a ray of sunlight hitting the leaf of a plant, transferring its energy to chemical form.  The sugars originated from a different plant, thousands of miles away.  A blade of grass, eaten by a cow and digested with energy obtained from previously eaten food, a chain tracing back to the energy it obtained from its mother in the womb, and eventually to a bacteria somewhere in the sea near the dawn of life, absorbing a ray from a much younger sun.  All of this to create part of a hamburger consumed by the finger’s owner earlier in the day.  500 calories it had, all of them originating in the nuclear furnace of a nearby star and traveling to the burger via separate paths.

Just a few molecules worth of the stored energy is needed to change the shape of the muscle from long to short, in unison with other cells creating enough force to move the bones and flesh of the finger.  Down it goes, sending feedback all the while to the brain via sensory neurons, letting it know when to stop pressing and release.

A key has been struck, momentarily allowing electrons to flow from one metal contact to another, triggering another wave of imbalanced particles which charges the electric field inside of a nearby transistor.  Another flow of electricity is set loose.  Again and again this happens, the transistors translating the electrical impulses into logical abstractions.  Current races around the silicon chip inside the keyboard, being converted to a language which can be transmitted down the wire to the connected computer.

Inside the computer, another chip receives this signal and signals the Central Processing Unit.  For a nanosecond, the computer stops the calculation being performed to register the keypress.  A series of instructions which were loaded when the computer was turned on guides the signal to a storage place for recent keystrokes.  Another program soon comes along and asks for the contents of that space, and is informed that a lower case “h” has been pressed.  At this particular moment, this means that the “h” should be added to another storage place in the computer’s memory, and displayed on screen in the input box of a webpage.

A program running inside the webpage is informed that the contents of the box have changed.  It then asks the browser to retrieve as set of suggestions from a computer hundreds of miles away.  The browser can’t do this by itself, so it asks another program, which runs a set of instructions that send a message to a card responsible for handling network traffic.  This card sends and electrical signal down the wire connected to it, which is connected to another device on the other side.  This device has circuitry of its own which handles reading the signal and sending it back out on another cable.  This is repeated over and over.  At each point, including the origin, the energy required for all of these transfers is acquired from an electrical outlet, hooked up to a huge power grid, in turn controlled by more computers and humans who have eaten hamburgers.

At some point in the chain, the signal is converted from electricity to light, and races down a fiber of glass at the fastest speed in the universe.  At the other end it is picked up by a light-sensitive transistor and converted back to electricity again.  A computer receives the query eventually and looks at the stored compilation of what other users have been searching for over the last few years.  It finds the answer stored in the magnetic configuration of a disk spinning 120 times per second.  A signal is sent back out via its network card, back across the hundreds of relay points.  The network card on the receiving end tells the CPU that data is available, which lets the operating system know.  The operating system determines the correct program to send the information to.  The browser tells the program running inside the webpage that it got a response, which then asks the browser to display it below the search box.

The browser does some calculations and sends a message back down the chain to the graphics card, which changes the signal that it has been sending to the monitor.  Tiny lights inside the monitor switch on and off.  Photons travel to the eye of the finger’s owner and set off a chemical reaction that eventually reaches the brain, setting off a cascade of neurons firing, translating the sight into language and higher level thought.  The information is processed and another motor neuron fires.

End note:  It amazes me how much complexity goes into this simple action, and I haven’t even given the most detailed description possible.  I’d love to see this expanded even more by people who know more about other fields.  I like this action as an example because it bridges the gap between biology and technology, and describes an interaction between entities close to the pinnacle of both.

Ubuntu 8.10 … err. 9.04

Posted in Technology on October 4th, 2008


::EDIT:: Looks like they updated the image my blog was pointing to.  I actually have been running the alpha/beta of 9.04 for about 5 weeks, and it’s pretty sweet.  Suspend is finally working completely correctly on my laptop which rocks, even though some of the need for it has been gotten rid of by the RIDICULOUSLY FAST BOOT TIMES.  Seriously, like <30sec.  Also, the new notification system is pretty nice, though I miss being able to click on things in notification bubbles (like sending a message to a Pidgin buddy who’s just come online).

::/EDIT::

I’ve been running the beta for a while now. Aside from not supporting my hardware well at all (my nVidia GeForce 4 MX and my Hauppauge WinTV-HVR-1950), it’s a snappy new release with lots of cool features. (Tabbed file management!)

On web design, and more TYPO3

Posted in School, Technology, Web Design on August 7th, 2008

It’s been a while since I posted last, and in the meantime I’ve been working on creating a website for the Computer Science Community at RIT.  Designing many websites lately has led me to appreciate how far web standards have come since I learned HTML 4 with table-based design when I was younger.  It was a major pain to get anything fancy to work across multiple browsers; maybe it was partly due to my inexperience, but I think a lot of it has to do with improved support for standards.

I must also point out that I’m refusing to test my code on Internet Explorer 6, especially since I don’t have access to a copy to test it on.  For the large part I’m also not caring much about IE7 either for my personal site, though I’ve found that most things work well in both without extra tweaks.

My experience with web design recently has been almost pleasant, a nice break from the application or system level programming that I did mostly for school this year.  It’s good to work in a language where my artistic side can come out more easily, and to quickly create user interfaces that I am pleased with.  I think I’m going to look into re-learning LaTeX as well, on recommendation from a freind of mine.

Anyway, back to the CSC website.  This was a much more involved use of TYPO3 than before, using a lot more plugins to create a much more useful and interactive website.  It has News with RSS support, a Wiki, and Forums.  I’m slightly dissappointed that TYPO3 does not provide an easy way to hide frontend usernames/passwords from admins, at least in the most current version.

It made me realize however that I should probably just link it to one of RIT’s central authentication systems.  The passport.rit.edu system looks promising, almost like OpenID.  I did try to link it to OpenID, by the way, but the plugin requires that the OpenID server return some data other than basic authentication, which most OpenID servers (such as LiveJournal) do not provide by default.  If the RIT authentication attempt fails, I may go back to trying to get that working.

I think it’s a fairly attractive and useful site, but you’ll have to be the judge.  For now it is accessible at http://csc.masterpi.org/, but we’re hoping to move it to a Linux server with a .cs.rit.edu domain once school starts.

I notice that I’m tending to like very clean, minimalist design now, if I can branching off from a logo or theme as I did with the CSC logo.  Maybe I’m just lazy or maybe my subconcious is telling me the web is too cluttered looking and overly visually stimulating.  I generally don’t have lots of images to use, and my photo manipulation and drawing skills aren’t great, so maybe that’s why my designs are almost entirely judicious use of CSS.  Something to ponder anyway.

Adventures with TYPO3

Posted in Blog, Technology on July 25th, 2008

As I suspected, it was only a matter of time before some new fun project wrestled control of my free time away from this blog. I’ve begun experimenting with a CMS I found called TYPO3. From what I can tell, its not extremely popular in the US, and it’s targeted at small-to-mid-level business applications; so it was kind of off of my radar as a personal user.

I came upon it because it had one feature I was looking for in particular: the ability to host multiple websites from a single administrative interface. Big name Open Source CMSes like Mambo, Joomla!, and e107 have plugins or methods which provide this or something close, but they seem very hacked-together and not really what they were intended for. Specifically, creating a new website cannot be done from within the administrative interface, and usually involves some symlinking.

TYPO3 is different because it bases it’s ability to host multiple sites on an extension of the natural tree structure of the site. At any point in the website tree, you can assign additional URLs which are intercepted when they come in and pointed to the correct portion of the tree. For example, if TYPO3 is installed in the root of your web server, and accessed by www.your1stdomain.org, and you’ve set it up correctly, it would return a website based on a different portion of the tree than if it were accessed by www.your2nddomain.org, even though they both resolve to the same IP address.

This was the first unique feature that drew my attention to TYPO3, but I have been impressed by some of it’s other abilities as well. It has a plugin (which is almost so commonly installed that it shouldn’t really be considered a separate piece of software) which allows you to base your website design on a static HTML file, and replace certain sections with content or navigation, based on the id attributes of the elements. You don’t even actually modify the HTML file unless you need additional ids to work with; all the conversion from static HTML to dynamic content is handled by a third entity, written in a language called TypoScript.

This adds to the learning curve of the software since there is a whole new language to learn, but it adds the ability to change the HTML template quite a bit without having to update the corresponding TypoScript, especially if the HTML is well written (using CSS, etc). This means that you can have someone who knows very little about dynamic websites or their implementation details write the HTML and CSS for you, and just convert it to a dynamic website using TypoScript. Also, it allows you to reuse the same TypoScript for many different website designs.

TYPO3 also has a good user management system and UNIX-like permissions. A user can also be restricted to a specific part of the page tree, say, a certain website, or just their homepage. It also has the ability to assign tasks to users with a workflow cycle e.g. Assign->Write->Review->Publish, as well as multiple workspaces (Draft and Live by default) and complete revision history.

I realize that most of these features don’t really help me as someone who runs their own website with little input from others, but I’m so excited about how cool they are that I might migrate my website over (excepting the WordPress of course, I’ve put too much investment in it, and it is an excellent blogging engine). There are some uses I can think of for having a multi-user CMS on my site as well: the SF3 website for example. I was looking through my homepage just now and realized how incredibly out of date both the information and the style is; though the code is as beautiful as ever. (I hand-wrote it back in 2005).

And so unfortunately I think my blog-enhancement project might get put on hold for now. Sarah bought me a journal (an actual paper one!) which makes private posts that just she can see kind of redundant, thus I’ve lost some of my motivation for the private posts plugin. One day I’ll come back to it, hopefully before WordPress advances 6 minor versions like it did the last time I stopped development on it.  :oops:

Google Docs Gets Templates

Posted in Technology on July 19th, 2008

For those of you who haven’t seen it yet, Google Docs now has a large directory of templates for Documents, Spreadsheets, and Presentations. I think this is an excellent idea for them because it gives non-technical users who aren’t otherwise interested in using an online office suite an incentive to do so. They’ve also opened it up so that others can contribute, which means free content for them, and a level of sharing templates that hasn’t quite been achieved yet by any office suite. They’ve already taken advantage of it’s ease-of-use to partner with Avery and have mailing label templates available in the directory.

I think Spreadsheets template directory holds a lot of promise for great innovations, since you can include a lot of functionality in a spreadsheet, especially with the extensibility Google has already provided it’s spreadsheets.

I do wonder about one thing about though: The documents directory contains a lot of résumé templates; would Google be impressed if you applied to them with one of their own templates? They promote them quite elegantly in the descriptions, and they are certainly very attractive résumés, but sometimes just using a template can come off as lazy. Not to mention that if everyone uses them, they lose any quality they had of being eye-catching and memorable.

OpenID Issues Fixed

Posted in Blog, Technology on July 19th, 2008

Well, it turns out that the problem with OpenID was mainly a buggy math library. Apparently the GMP module is not compiled correctly on my BlueHost server, which causes signatures to be calculated incorrectly by the PHP OpenID library, resulting in a ‘Bad signature’ error code. If you have similar problems, try switching on the constant Auth_OpenID_Buggy_GMP like so in (wordpress root)/wp-config.php:

  1. define(Auth_OpenID_BUGGY_GMP,true);

After you do that, make sure there are no entries left in the table (prefix)_openid_associations. I think rebuilding the tables from the preferences page might do this, but if that doesn’t work you’ll have to do what I did and remove it from the table by hand.

Once I had that fixed, I had to update the interface for adding OpenIDs to accounts, I guess because of an incompatibility with WordPress 2.6. It seems what was happening was that the hook function for the return wasn’t getting called because it wasn’t being redirected back to the plugin page. To fix it I had to change the $return_to parameter passed to start_login to point back to the plugin page’s address. I then had to modify start_login to check for a “?” in the URL and pick “?” or “&” appropriately for appending the action parameter. (The ternary operator is a beautiful thing in PHP).

I’m not sure if this change will create a problem when adding more than one URL at once, because the form is set to call the URL it’s retrieved from, which includes all of the OpenID information. I’m fairly sure it won’t because the handler for that form uses POST data, so it shouldn’t be bothered by the GET data in the URL.

If anyone else is having similar problems with the plugin and my explanations aren’t adequate, please comment and I’ll see what I can do to help. Another thing to try is downloading the most current version of the PHP OpenID library (2.x.x) and copying the Auth directory into the plugin’s root directory.

Now, on to my next task: comment threading.

Ubuntu 8.04! :D

Posted in Technology on March 11th, 2008

Fun with Compiz Fusion

Posted in Technology on August 20th, 2007

Gotta show this off ’cause it looks soo cool.

Pretties

Yeah, I’m bored.

Standputer!

Posted in Technology on March 25th, 2007

Standputer!
I may just have to let this one speak for itself.

Nautilus-VC (now in Python!)

Posted in Technology on March 10th, 2007

Those of you GNOME users familiar with TortoiseCVS on Windows are probably aware of the lack of a similar program for Nautilus. There appear to be a few attempts at such a thing which have failed due to some annoying problems with the way CVS works that make the problem more difficult than it seems at first. After much digging through not-the-best or non-existent documentation I’ve managed to hack together a program in Python to at least display the CVS status of files as emblems. (for some of the statuses anyway – and it doesn’t work correctly for directories). Anyway, I do at least have a screenshot to show for my efforts:

Testing Nautilus-VC