Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: representing numbers

I notice a tag popping up around slashdot, namely hex09f911029d74e35bd84156c5635688c0. The context of the tag is irrelevant to any civilized person, but I was intrigued with the prefix hex, presumably to indicate the number was base 16. I wonder if the use of the prefix, instead of the more traditional 0x, was due to the increasing distance between the technical elite and the hardware

As I am sure we all know, a digital computer represents all information by either an on or off state, which is typically represented numerically as 0 or 1, respectively. As the digital state is often implements as an analog current, there is often some firm threshhold value, above which the state is said to be on.

Therefore to represent a peice of information, such information must first be encoded in as a number, then the number encoded into a series of off or on states to represent that number. This is where binary notation comes from. Using only 0 an 1, in principle we can represent any number as easily as using the 0-9. For instance, using base 2, the number representing in decimal form as 4 would be 100. Perhaps a bit verbose, but quite adequate when one can complete thousands of operations every second.

The verbosity, however is a problem for humans. For instance, to represent the decimal number 9 requires us to write 1001. While a digital device has no problem with this, and humans working to hardwire code have no problems, as the amount of information to encode becomes greater, humans wish to have more information density.

Which is where Octal, or base 8 representation emerges. Octal notation groups three states, or bits, in one. In octal instead of only using the digits 0 and 1, we use 0-7. This means that to write the decimal number 7 instead of writing 0b111, we write 0o7, i which the 0o prefix means octal.

Octal was nice when bits were base of the computers, but soon information grew so much that we began to group bits together. The smallest traditional grouping of bits is the nibble, which contains 4 bits. This means the biggest number that can be held is 0b1111 or the decimal number 15. This lead to the idea that we might want a numbering system that can represent numbers up to decimal 15, and the hexadecimal system was used. In this system, digits go from 0-F. Therefore the decimal number 7 is written 0x7. The decimal number 15 is written 0xF, 0o17 or 0b1111. One can see that even though the computer does not care, it is easier for people.

Hexadecimal was quite used prior to the mid 80's. While programming tasks were easily handled through the alphanumeric keyboard, with minimal special keys, formatted text processing required copious use of the entry of special codes. Even in programming, it was useful to direct many function directly through the hardware using hex.

So, obviously, with the huge bit capacity, it is quite easy to see why we use hexadecimal to represent numerical values. What is not so obvious is why we represent using the longer form hex09f911029d74e35bd84156c5635688c0 rather than 0x09f911029d74e35bd84156c5635688c0.

User Journal

Journal Journal: This is nuts

Two recent story titles on Slashdot:

Washington Bans Chemicals; Industry Freaks
Microsoft's 'Men in Black' Kill Florida Open Standards Legislation

Why do I continue reading Slashdot? Why do I put up with this juvenile content? Maybe it's time to think of retirement.

User Journal

Journal Journal: Keepa you space probe offa Europa!

On December 10, 2004, Tackhead wrote:

Oompa Loompa, doopity doo,
All these world are belong to you!
Ooompa Loompa, doobie-doo-dopa,
Keepa you space probe offa Europa!

I just wanted to let you know I am still chuckling over this over two years later.

Alan Canon (LouisvilleDebugger)

User Journal

Journal Journal: Database maintenance

Slashdot posting has been down for two hours now. Attempts to post are greeted with the rude message, "Database maintenance is currently taking place.". Two hours to do database maintenance? Give me a break!

p.s. They're still managing to put stories up on the front page though. Go figure.

p.p.s. I checked back, and posting is still down after four hours.

Portables (Games)

Journal Journal: First tilt-action game runs on new Powerbooks

When Apple revised their Powerbook line earlier this year, they added Sudden Motion Sensor (SMS), a detector that can be used to protect the hard drive if the machine gets dropped. Chances are, they probably weren't expecting it to be used as a video game controller, but Balooba software figured out a way, as demonstrated in Bubblegym. According to the author, "this might be the first computer game that is controlled by moving the notebook computer itself." Who says Macs can't play the best games?
Google

Journal Journal: Interesting start to Google Maps, but much remains undone 3

The UI is definitely slick, but it definitely has some quirks, some annoying. Some random observations:

  • The maps seem to be three dimensional. Look at the map of a complicated highway interchange and you'll see that it seems to get the over / under ramps correct. (For example, look at this map & zoom all the way in -- it pretty accurately reflects a complicated, braided set of onramps & offramps).
  • On the other hand, it's not completely three dimensional: while the map has surprisingly current data for Boston's Big Dig, for example, it doesn't actually illustrate the points at which the roadway goes underground. Considering that some of these tunnels have surface roads over them, or will in the future if they don't already, finding a way to denote a tunnel seems important.
  • It doesn't show one way streets! This is absolutely essential, especially in urban areas where a lattice of one-way streets can force you to take convoluted routes to follow the seemingly simple paths you could have taken if all the streets were bidirectional. A map service that can't show this data is much less useful than one that does. (That said, the trip planner does seem to show routes with an awareness of one-way streets, and will plot different to & from directions accordingly. So they do have the data, and they do use it where it matters, but they aren't making it visible in the interface. This may have been a deliberate attempt to constrain against information overload, but in this case I think the user really does need that data visible, at least optionally.)
  • While the UI is nice and responsive in a way few other web sites are, it has some idiosynchroncies. For example, if I search to a map, then scroll somewhere else, then go to a different browser tab, it sometimes snaps back to the original search when I come back, rather than whatever I was looking at. If I do a new search, it scrolls to the new location from the old one; while this looks cool and may be the desired result if I'm thinking about directions, other times I may be thinking of a completely new & discrete search, and don't want to treat the two searches as a set -- some kind of "new search" option would be good. (This last one is subtle to describe, but kind of annoying once you pick up on it -- it's definitely useful, but maybe a little too helpful, ya know?)
  • I like the way it dynamically fills up the current browser window size: note the way the map is always just a bit shorter than the current view is tall. If you resize, the page will start scrolling or have a white margin on the bottom, but will quickly redraw to match the new geometry. Clever.
  • The overlay of local data seems much more polished than it was with last year's Google Local. Maybe this will mean abandoning Google Local as a separate entity and incorporating its functionality into Google Maps -- they're already most of the way along to doing exactly this.
  • As widely requested, non-US/Canada data would be nice, but I'm sure such things are on the way. Moreover, Google already pulls interesting geolocation tricks, such that a request for google.com from an internet cafe in, say, Switzerland, will automatically and transparently redirect you to google.ch. Likewise, a search for http://news.google.com will redirect you to http://news.google.com/news?ned=de_ch&hl=de. I'm sure that once this gets going, Google Maps will also automatically send visitors into a mapping application that is relevant to their location.

Wish list items:

  • Realtime traffic data would be nice, the way Yahoo is now offering. Factoring traffic data into trip planning would be a good next step. Factoring in predictive traffic data would be better -- e.g. "when should I leave and what route should I follow if I want to get from Boston to Washington, D. C. without hitting rush hour traffic in New York City?"
  • Being able to place constraints on planned trips would be nice. "How do I get from Medford MA to Burlington MA without using a limited-access highway?" (Maybe I'm riding a bike; maybe my crappy car can't go above 40mph -- it doesn't matter why, it should just be possible to ask for it.). "How do I get from Medford to Burlington, with stops in Reading and Woburn along the way?" (Maybe I have errands to run in those towns and don't want to make a series of trip plans when I can just have one with waypoints.) "Accounting for traffic lights, frequent traffic jam areas, highways, and tolls, what would be the fastest & cheapest commuter-time route to and from Somerville MA to Waltham MA?" (Taking the turnpike is longer but might be faster, but it will cost a couple bucks each way; surface roads might be fast, but congestion in certain areas is chronic; what route will be most reliable?)
  • Topographic data would be nice. Using it as a factor in trip planning would be better, e.g. "I want to bike from Somerville MA to Waltham MA on a route that avoids major roads and big hills. Please find me a route."
  • Weather data would be nice, but not as critical.
  • Accurately showing one way streets is essential. Finding a way to depict underground streets (or bridges, etc) would be nice, but the lack of it isn't critical.
  • The functionality to create a link for the current view doesn't work properly: it'll give you a search that more or less shows the region that was being examined, but it will be all zoomed out and improperly centered. It would be nice to have a better approach to this.
  • Support for Safari would be nice, but I suppose it's on the way...

This is an intriguing start, but I can see all kinds of ways to build on it, and hope that Google will continue to improve the product now that it is available to the public (as opposed to services like Google News, which is good, but seems to be basically identical to what it was when the beta went live a couple of years ago). Unlike Google News, the unfinished aspects of this tool are obvious enough and annoying enough that I'm not sure I'd yet be willing to make this my primary tool for searching for this kind of information.

Spam

Journal Journal: Anti-blog spam efforts

So, anecdotally, it looks like Google's anti-blog-spam campaign may be working. A handful of easy changes to my home blog seems to have helped tremendously:

  • I looked over Google's plan, and Movable Type's recommendations.
  • I added the Movable Type implementation of the "nofollow" plugin
  • I renamed all the MT CGI scripts so that spammers have to actually look to find the comment URL.
  • I added a new script at the old comment & trackback URL:

    #!/usr/bin/perl -wT
    print "Content-type: text/plain\n\n";
    1

  • After noticing that the spammers all seem to have a referer of "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)", I added the following code to the comment script:

    sub squash_spammers {
    my $agent = $ENV{'HTTP_USER_AGENT'} ||= "";
    my $referer = $ENV{'HTTP_REFERER'} ||= "";
    if ( ( $agent =~ m/NET CLR 1.1.4322/ ) ||
    ( $referer =~ m@\.info/$@ ) )
    {
    # print "Content-type: text/plain\n\nsorry\n";
    die "Sorry, this is a spam-free zone. $!";
    }
    return;
    }

    This is now called in the eval block that does the rest of the work for the comment script, so attempts to spam me automatically fail. If I need to add more criteria, I can hook them in as needed, but these two rules seem to have caught everything so far.

Since making these changes, things have gotten much better. I've had no comment spam this week (usually, a handful makes it past the comment spam plugin), and more strikingly, the amount of referer traffic -- requests for random URLs with referer fields like "http://buy-zanax-online.best-buy-site-4u.info" -- has almost, if not quite entirely, disappeared. This is wonderful.

We'll see how well it's working a month from now though ...

Hardware

Journal Journal: Mini Mac mechanism 5

So, out of curiosity, has anyone seen the guts of a Mini-mac yet ? The pictures I've seen on Apple's site -- particularly one of the motherboard and one with the cover removed -- give you some ideas -- compact motherboard, RAM on one side, skinny optical drive on top, mini-speaker in front -- but I'm curious about the hard drive: did they actually jam a full sized IDE drive in there, or is it a compact laptop model or a super-compact iPod one?

Some of the rumor sites were paying slavish attention to the deals Apple was making for bulk purchases of minature hard drives from Asian manufacturers. All of this speculation centered around the possibilities for new iPod models, but it occurs to me that at least some of those drives are probably going into the new Mac as well.

So -- has anyone had a chance to get pictures of a disassembly of a mini Mac yet ?

News

Journal Journal: Arbeit in der Schweiz? (Practicing my German, more like...) 5

My wife's company would like to transfer her to an office in their Swiss office in Lucerne / Luzern, but she's got baggage -- me.

So, they're willing to sponsor her, take care of her visa & other paperwork, help set her/us up with an apartment, and bring her over for a couple of year, while she learns how the European side of her company works and she gradually makes her way up the management ladder.

Meanwhile, I'll have to leave my job and basically start over; there's basically no chance that her company's Swiss office would have any IT work (it's all either in the US or outsourced to India). But that's alright, it's an opportunity strongly to be considered, right? But I haven't the slightest idea what the IT market is like in this little, seemingly rural part of the country, and there's so much that needs to be sorted out before going and once we get there.

  • What skills are in demand in central Switzerland? How does one go about learning such things? Same as here, I guess -- find & browse job listing sites...
  • Is there any IT work in a medium sized city, or is it better to commute to Zurich or Bern? How feasible is it to commute that far each day?
  • How much of a liability is my weak grasp of the languages? I'm sure I can pick it up once I get there, but at this point my German and French are both very weak, and I only know as much Italian as I can puzzle out from the Latin I took waaaaay back in high school. I've heard it said that most IT work is done in English, but as a practical matter, don't you have to have a grasp on the dominant local language[s] as well?
  • Is there any chance of finding full time, salaried employment, or will it all just be consulting gigs? I guess I don't care either way, but a nice predictable job sounds appealing right now...
  • Is it better to be paid in Swiss Francs, Euros, or US Dollars? Or will that question even come up? If the dollar keeps plummeting, as it seems like it will, the Euro looks more appealing -- but then when the IRS comes knocking it could become painful, fast.
  • What happens back home? We bought a car before this opportunity came up -- a Subaru Forester -- a nice, reasonable car for snows and mountains. Is it insanity to ship it over with us? Is it insanity to sell a three month old car with less than 4000 miles on it? And what happens with our mortgage back home -- does it make more sense to rent or sell?
  • Will it make sense to talk to someone at a Swiss consulate before going, or getting in touch with some kind of relocation agency? I suppose it would make more sense than babbling about it on Slashdot, but oh well, the timing of this article caught me right as I was starting to consider all these questions...

Maybe it would be easier to just bus tables at a ski resort and take a few years off from IT...

I need to start working on my resume, or CV I guess. European CVs don't bear much resemblance to American resumes, do they? It seems like they're a lot chattier & biographical than the dry list of titles & skills & credentials that is expected over here. Just one more thing to do in the next handful of months....

User Journal

Journal Journal: Google Desktop Search + Apache Reverse Proxy for LAN search

So Google has finally offered a form of desktop search, but it only works on localhost. This seems reasonable for the average home user, but an obstacle to setting up something even cooler: a slick Google powered local LAN search engine. Think about it: even on a mostly Mac / Linux network, you can set up one Windows box that has Samba mounted your main network shares with the Google software, and through the magic of HTTP reverse proxying, your whole LAN can have a nice Google search interface into your local documentation.

So. The obvious thing to try then is to set up Apache (or Squid, or similar software) running as a reverse proxy on that machine.

The first thing I did when finding out about this tool was to install it on a spare Windows machine with a couple of Samba mounted network drives (I'm hoping that it will index the content of these drives, but I can't tell yet), then set up Apache as a reverse proxy to provide the indexed material as a URL that would be widely accessible on the local LAN.

So far I can't quite get it to work -- I can connect from another computer (a Mac running Safari), but first I get complaints about running the wrong browser, and then I get errors about invalid URLs that apparently aren't being passed through. Still though, it seems certain that this should be doable, and if it can be done, this would beat the living snot out of the current ht://Dig based search engine we're using.

Google is right to make this tool inaccessible from non-localhost access -- the average home user does not need to have the contents of their hard drive set up with an easy to browse, globally accessible search interface. And I can see where Google wouldn't want this to work on LANs either -- it would cut into their business of selling search appliances. But come on, this is right on the cusp of working as it is, and it's only in beta. If Google doesn't provide a way to turn on access for local (e.g. 192.168.x.x) addresses, I'm sure that Apache or something like it can be configured to do this.

Security

Journal Journal: Apple Remote Desktop bug ?

I think I've found a bug. I'm not sure if it's an ARD bug, a Fink bug,
or something else, but I definitely triggered some unwanted results.

I used ARD2 to install Fink (the 0.6.2 installer package) on two remote
machines, neither of which had a currently logged in user.

When installing Fink locally, one of the last steps is to invoke a shell
script that sets up basic environment information for your account -- it
adds /sw/bin to your path, etc. If Terminal isn't already running, it
will launch for this. I'm not sure how or why Terminal gets launched
when it seems like it should just be able to run silently & detached,
but no matter; suffice to say that the Fink installer launches Terminal.

The installer was taking a very long time to finish, so I took a walk
around the office to see what was going on with these machines. Here,
roughly, is what I found:

        http://devers.homeip.net:8080/images/ard_bug.jpg (204kb)
        http://home.comcast.net/~teridon73/ard_bug.pdf (mirror of original, 1.2mb)

The screengrab above was a 1.2mb download from my poor little bandwidth starved computer at home, but then someone offered to mirror it -- thanks! -- and someone else pointed out that a JPEG would be much smaller. Which it is. So the bandwidth issue shouldn't be such a big deal now.

What we have here is a system displaying the normal login screen while
in the background a Terminal instance is running with the root user's
priviliges. Because running Terminal means having a normal menu, I can
also click on the menu items, launch things like Software Update and
System Preferences, and open up new Terminal windows -- with root access
no less -- from which I can run just about anything I please.

For laughs, I launched the Finder & Dock so that I would have something
resembling a normal login session, even though the login window was
still sitting there greedily hogging the middle of the screen.

For more laughs, I used the login window to log in as myself. This
seemed to work, kind of, in that now I had GUI programs running at the
same time, some with my access level (according to the "log out cdevers"
item in the Apple menu) and some with root access (according to the "log
out administrator" item).

If I hadn't manually walked by to see what was going on, I might have
ended up leaving these machines on with unattended root access
overnight. If these machines had been at a remote location, I wouldn't
have necessarily realized what was going on at all -- I didn't even know
it was possible for any user to launch GUI programs from the login
screen, so I'm not sure it would have occurred to me to control the
desktop and see what was going on.

As I say, there are several possible sources of this problem -- ARD,
Fink, something else -- and I'm not sure who to blame. I can't imagine
that this was the intended behavior though, was it ?

User Journal

Journal Journal: Right vs Left 2

This Red vs Blue video is very appropriate.

Why can't I make a simple comment about my probable choice in November and my reasons for making that choice without being insulted by somebody who can't spell? My post is very straightforward. I spell out the choice and the reasons. I don't insult Bush, I don't insult Bush supporters, I don't insult anybody, and still, the debate degenerates into an all-out battle, just like the video.

In fairness, I got a lot of nice responses, too. But still, why can't somebody state his opinion on the internet without being jumped on?

I guess it's just more evidence for how anonymity removes inhibitions.

User Journal

Journal Journal: Free as in Free 1

I just realized today that there is an enormous population of internet-literate people out there who never grew up during the Cold War. An entire collection of slashdot posters who don't remember when the world was divided into East and West. Kids for whom "MAD" and "Nuclear Winter" belong more in the Fantasy section, and who never had to wonder about how these terms might one day apply to their lives.

Of course, that's what happens as time goes on. I was born well after the era of "duck and cover", my favorite memory of the moon landings is The Onion's "coverage", and I don't remember the Soviet invasion of Afghanistan.

Even so, I start to get this feeling that people are forgetting those days. Not that I blame them. There are plenty of things from those times that bear forgetting. It's no coincidence that Charles Stross's "A Colder War", an insane worst-case scenario of the Cold War, is the only short story I've ever read that gave me nightmares.

But there are a lot of good things from that time, too. Among the good things from the Cold War that people are rapidly putting behind them is the whole purpose and reason that we fought a forty-year global struggle and put modern civilization under the constant threat of catastrophic war. Just why were the Russians so reprehensible in the first place? I've known some Russians, even been good friends with some, and they always seemed just fine.

What was the difference between East and West? Of course, this is slashdot, and so you'll never get a simple answer when a complex answer will do. Not that this problem only exists on slashdot. Plenty of people will tell you that it was about ideology, or economic systems, or simply a power struggle between the two great powers of the age. They are probably right, too. But for me, growing up in the 80s, watching movies about people escaping into West Germany and having my Saturday morning cartoons interrupted by live coverage of Tienanmen Square, the difference between East and West always boiled down to freedom.

The word "Freedom" is incredibly vague and flexible. To one person, a slave is free if he willingly made the choice to become a slave. To another person, a person is not free unless he has the right to a telephone. But the Cold War was ultimately a war of freedom, vague or not.

During my childhood, a picture of the East built up in my mind. On that part of the planet, you could be jailed for criticizing the government. Police would break your door down in the night and ransack your house if you were a suspect. The cliched "Papers, please!" The government choosing your job for you. No travel without a permit. No leaving the country at all, unless the government trusted that you would be coming back.

The picture I paint above is probably wrong in many respects. I do not begin to claim that it is accurate, but it is what existed in my mind at the time.

Of course, the West in general and the United States in particular was the exact opposite. The police could not search your home without a warrant. You can feel safe criticizing the government, even the President, in your home, on the street, or even in a nationally-distributed newspaper. If you were stopped by the police, you could refuse to allow them to search you, and they'd have to listen unless they were sure they had a reason that would stand up in court. No permits or papers or anything needed to go from one end of the country to the other. No need to ask anybody's permission before leaving the country. Nobody would follow you around because of your political affiliations. Nobody would tap your phone lines because you liked Russian music. Nobody would rummage through your library records searching for Communist ties. A place where "because I feel like it" was good enough reason to be wandering around somewhere at two in the morning. Innocent until proven guilty.

Just as it happens for everybody, the world became more complicated as I grew older. Black versus white blurs into shades of gray. I learned of McCarthy, of the excesses in Vietnam. I learned that not everybody was an unhappy, oppressed slave in Communist countries. I learned about racial profiling and Big Business, about monopolies and environmental disasters and Syphilis studies.

But even through it all, the US remains a place that strives for freedom. Of course, we don't have perfect freedom, even if such a thing could exist, but we strive for it. It is the entire reason and purpose for this country's existence, even if we do a bad job of it sometimes.

Neal Stephenson puts in nicely in The Diamond Age:

"That we occasionally violate our own stated moral code," Major Napier said, working it through, "does not imply that we are insincere in espousing that code."

"Of course not," Finkle-McGraw said. "It's perfectly obvious, really. No one ever said that it was easy to hew to a strict code of conduct. Really, the difficulties involved-the missteps we make along the way-are what make it interesting. The internal, and eternal, struggle, between our base impulses and the rigorous demands of our own moral system is quintessentially human. It is how we conduct ourselves in that struggle that determines how we may in time be judged by a higher power."

This post is for everybody who's ever questioned the need for anonymity, everybody who's ever stated a preference for catching terrorists over following proper judicial procedure, and everybody who thinks more intrusive airport security is worth it. Many people have forgotten, or never remembered, the fundamentals of what freedom is all about. It's not about being rich, or safe, or cared for. It's not about stifling technology. It's not about prohibiting companies from making their products secure, and it's not about spurning anonymity because it might help child pornographers. It's about being free to speak your mind, run your life, and be without persecution. In the end, it's about not having to justify your own actions just because they're different. In a free society, you don't have to justify your desire not to be identified, your desire to be free from searches, or your desire for privacy.

OS X

Journal Journal: Vulnerability with the OSX screensaver password lock

No one wants other people messing around with their computer when they're away from their desks, but what can you do? It's not practical to log out every time you want to go for a cup of coffee, so many people put a password lock on their screensaver instead.

This is much more convenient, but it has a serious Achilles' heel: if you are in an environment where many people have logins on your computer, such as an office with centralized login (NIS, ActiveDirectory/Kerberos, LDAP, OpenDirectory, NetInfo, etc) where everyone has an account on every computer, then anyone can use their own login to disable your locked session. The only record of this will be an entry in /var/log/secure.log, which is only useful after the fact -- provided that the person who logged in didn't know to cover their tracks.

For a lot of people, this probably defeats the purpose of locking the screen to begin with; until & unless Apple provides a way to change this behavior, it may be wise to avoid the screen saver lock and fully log out of the system whenever you will be away from your computer for a long time (lunch break, overnight, etc).

Addendum:

This may only work for Admin users, which would be a lot less serious than I was thinking at first. I need to test that...

Slashdot Top Deals

A morsel of genuine history is a thing so rare as to be always valuable. -- Thomas Jefferson

Working...