21 October 2009

Magic indeed

I just noticed Apple came out with the "Magic Mouse" yesterday.

The same Multi-Touch technology first introduced on the revolutionary iPhone comes to the mouse. It’s called Magic Mouse, and it’s the world’s first Multi-Touch mouse. Click anywhere, scroll in any direction, and swipe through images on its smooth, seamless top shell.

The new Magic Mouse redefines what a mouse should do. In addition to its smooth, seamless top-shell design that acts as one button or two, Magic Mouse features a Multi-Touch surface with gesture support. Scroll vertically, horizontally, and diagonally — a full 360 degrees — simply by touching anywhere on the top surface. With a greater surface area for scrolling, you can get around a long timeline in iMovie, through a lengthy web page in Safari, or around a set of images in iPhoto more efficiently. You can also swipe through pages in Safari or photos in iPhoto with two fingers. It’s the most advanced Apple mouse ever made.

...NO. I really wish Apple would knock this off, it drives me insane. Multitouch was not introduced on the revolutionary iPhone, and this isn't the world's first Multitouch mouse. They should know, since they destroyed the company that made them. They've owned Fingerworks' technology for almost five years now. They own it. They don't need to copy it or reproduce it, they've literally got the guys that invented it working for them right now, and after five years they created a legendary magical mouse that lets you:

  • Click anywhere

  • Scroll in any direction

  • Swipe through photos


I realize Apple users are new to the concept of a functional mouse and might be a little behind on all the advances, but last time I checked mice already let you click anywhere. They also let you scroll in any direction, scroll wheels were added to mice 15 years ago, and rocker wheels weren't long after that. Finally, side function buttons for swiping through photos or whatever else you want are maybe a decade old. Calling scrolling in any direction "gesture support" is absurd, this was gesture support

Apple bought out the best multitouch company there was and took five years to incorporate their technology into a mouse that's only ten years behind the rest of the world. Not that I can really argue with their selling point, it is "the most advanced Apple mouse ever made."

08 October 2009

Emacs -> Sprunge

Woo code! I got bored and wrote a function for Emacs that posts the current buffer to sprunge. Since I'm usually pasting IRC snippets, I also threw together a major mode with 4 regexps to syntax highlight IRC. Behold:



Here's the elisp source. The hash table maps major mode names to the corresponding pygments lexer name, which sprunge uses for syntax highlighting; if the mode of the buffer you post is in the map, the sprunge link will include the correct argument to syntax highlight it the same way

(setq sprunge-suffixes (make-hash-table :test 'equal))
(puthash "Python" "py" sprunge-suffixes)
(puthash "Shell-script" "sh" sprunge-suffixes)
(puthash "IRC" "irc" sprunge-suffixes)

(defun sprunge ()
"Posts the current buffer to sprunge, and shows the resulting URL in a new buffer"
(interactive)
(if (buffer-file-name) (save-buffer) (write-file "/tmp/sprunge-post"))
(delete-other-windows)
(let ((sprunge-buffer (get-buffer-create "*sprunge*"))
(sprunge-window (split-window-vertically (- (window-height) 5)))
(filename buffer-file-name)
(suffix (if (gethash mode-name sprunge-suffixes) (concat "?" (gethash mode-name sprunge-suffixes)) "")))
(select-window sprunge-window)
(set-window-buffer sprunge-window sprunge-buffer)
(erase-buffer)
(insert (shell-command-to-string (concat "curl -F 'sprunge=<" filename "' http://sprunge.us")))
(delete-char -1) ; Newline after URL
(insert suffix "\n")))

(define-derived-mode irc-mode
text-mode "IRC" "Major mode for IRC logs"
(setq font-lock-defaults
'((("\\[[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\]" . font-lock-constant-face)
("<.*>" . font-lock-keyword-face)
("[a-zA-Z0-9`^_-]+:" . font-lock-type-face)
(">>> .*" . font-lock-builtin-face)
))))

26 August 2009

Genius bloggers post on occasion

My disagreements/line ratio with the latest Coding Horror is unusually high, and there doesn't seem to be a Proggit post for it yet (and it'll be a cold day in hell before I start submitting Coding Horror posts), so I figured I'd blog instead.

Atwood is a big fan of synecdoche: he has an annoying and incessant habit of using "we" when he really means "I". If he does something, it's not "Jeff Atwood does this", it's "software developers do this". Often it's "professional software developers do this", so we don't get confused and think he's a noob. Virtually every Coding Horror post at some point indirectly contains the assertion that Jeff Atwood is a genius developer, by demonstrating how Atwood does X and then slipping in "on a totally unrelated note, genius developers are known to do X". The most common mechanism is the transparently fake self-demeaning sound bite "all code sucks, especially mine". He says it so often he's starting to become famous for it, and I might respect it if he didn't feel the need to add in, every single time, "and uber-programmers realize this", like it's an afterthought. "Oh gosh, I guess I am a badass after all -- I didn't even realize! That was a close one, readers." I swear he's trying to inculcate his readers to subconsciously associate "Jeff Atwood" with "badass programmer"; I see no other reason for his ostentatious repetition of a fairly commonplace expression. I would honestly prefer if he just flat out said "I'm fucking awesome; deal with it" so I wouldn't need to wade through his obfuscated self-aggrandizement.

The latest post was no exception, of course; despite being less than a page even with graphics, he managed to slip in "the tipping point between amateurs and professionals in our industry: the professionals realize everything they write sucks."TM But before he got to that, he explained why he we blog:

We may kid ourselves into thinking we're writing out of some sense of public good, or to create connections, or contribute some small bit of knowledge to the world. But let's face it. Most of us blog because we're raving egomaniacs. We not only love to hear ourselves talk, we're incredibly eager to hear other people talk about us, and the more the better

Emphasis not mine, but I think it's probably beneath even me to comment much on that part anyway, especially considering what I've already covered. The main assertion that people blog for recognition seems unlikely, however, if only because 99% of blogs are read by pretty much nobody, and I like to think we're all aware of that. I have like three readers; I get way more exposure commenting on Reddit than I do blogging about something. I blog because I enjoy writing about things. And because if I kept my hatred of things bottled up I probably would've attacked someone by now, but that's a secondary benefit. I may not be particularly good at blogging, or particularly knowledgeable about the things I do blog about, but neither of those things matters in the slightest. This blog could just be saved in a file on my computer and I would get the same enjoyment out of writing in it; the only reasons it's online are because I occasionally link to it if a discussion about something I've covered comes up, and because setting up a blog is trivial so I see no reason not to. I occasionally try to "contribute some small bit of knowledge to the world", but most of the time my blog posts are just about things I felt like writing about at that moment. I don't post my blogs to Digg or Reddit (I hate when people do that, actually), or really make any effort to try and garner readers. Maybe that's unusual, but I think most bloggers blog because they enjoy writing about their interests; they're not under the delusion that the rest of the Internet is interested in reading about it

On the other hand, I might just be secretly hoping that Atwood reads my blog, as he has "an automatic Google ego search set up for my name". I really didn't think people googled themselves anymore, and certainly not continuously via a script, but again, maybe that's just me


And really good bloggers say that. Draw your own conclusions

05 July 2009

Quests for Power

I figure I should post before a full year since my last post elapses. I'd like to share the fun story of trying to find a replacement power cable for my SATA dock.

I have a hard drive dock. Sadly, I appear to have misplaced the power cable. No problem! I'm sure power cables are easy to replace. First I went to Radio Shack. I told him I needed a 12V/2A cable with an H-connector, and he proceeded to tell me they didn't carry them. That sounded fairly wrong, so I led him over to the wall where they indeed have power cables with a neat little adaptor that lets you put any connector on the end. However, it turns out the main cable plus the H-connector somehow costs $35, which is considerably more than just buying a whole new dock. Since Radio Shack was probably my best hope of finding a cable, I decide to try and find another dock or enclosure instead, but they don't carry them.

Next I tried to go to Best Buy, but couldn't find it. Probably a good thing, as I imagine the docks there cost more than multi-terabyte hard drives at other stores. In desperation, I went to Walmart. I don't think I've ever bought anything computer-related at Walmart, but I tried anyway. I poked around in their external hard drive section for a minute until one of their very helpful staff came over. This is verbatim, even the last line:

Me: Do you guys have any hard drive enclosures?
Helpful Walmart Employee: ...what?
Me: Any hard drive enclosures? Or docks, maybe?
HWE: Uh...no, we just have...the RAM
Me: ...OK, thanks

In conclusion, I was disappointed in Radio Shack, but completely unsurprised by Walmart.

On a totally unrelated note, I now have the power (I originally typed "ability", but couldn't resist the pun. I'm weak) to control my hall light from my computer, which I'm fairly pleased about. I planned to describe the complicated procedure involved in settings this up, but unfortunately it's pretty much:

  1. Take off a light switch and wire the WS467 in
  2. Plug in a CM11a and connect it to a computer
  3. Install heyu

I'm still awesome though. I need more of these modules. Lots more