Post-Another Hiatus - Node and Keyboards
Oops, I accidentally had another hiatus.
So last time I said I'd talk about stuff like Node and Ajax. Also recently I've been thinking about keyboard layouts so that could be either a current or future topic.
Also I realized that now I am no longer an IB student, but I can still write about Emacs from a student's perspective! Though that does mean I'm going to have to get back on track with writing about Emacs and not about other cool stuff.
With a lot of developers on the internet hyping about Node right now, I thought it was time that I start learning Node. The first problem I ran into was that it was really hard to find a good getting-started tutorial. It took a long time and I finally found Node Hero as an acceptable tutorial. (Yeah, I know some people say RTFM, but it's really hard to get started with something just by reading the manual)
So I breezed through Node Hero. It was really easy to follow and it worked! Unlike other outdated tutorials. It starts off walking you through the setup, then gives a hello world on the console, and intros the organization of a Node app. Then in the next chapter it goes into NPM, and the chapter after that into asynchronous programming (whose explanation I am sure I have seen a bajillion times before but never really got it). Then finally it gets to the cool stuff: making our first HTTP server!
Now making a barebone HTTP server was cool and all: I could route requests, serve pages, and log on the console. But... what if my future webapp gets complicated? Like I want authentication and database access and stuff like that. And, as Node Hero author Gergely Nemeth said: "The http module is very low-level - creating a complex web application using the snippet above is very time-consuming. This is the reason why we usually pick a framework to work with for our projects."
So I continued with the tutorial as he went into using Express. I had difficulty understanding the pipelines thing since, well it barely resembled UNIX pipelines. What if I wanted a separate sequence of pipelines? Was I not able to or was there some special thing I had to put in between chains or do I have to put it in a separate file or what? I don't know, maybe this was a beginner's confusion, so I pushed on with the tutorial. Next was working with databases.
So as a webapp framework, I am unable to see Node as any better than Rails, so I'm just going to go sharpen my Rails skills instead of being mediocrely good at both Node and Rails. Although, for real-time multiplayer games, Node could be a good choice since it seems better at working with Socket.io, though I did find a Rails plugin. No tutorial for Socket and Rails though, and all the Socket and Node tutorials are outdated and don't work.
Okay now we're on a completely different topic.
My computer is a Lenovo LaVieZ, which was originally designed by NEC for Japanese consumers. The physical design of the keyboard was left unchanged (when Lenovo changed the Japanese keyboard to English), but keys were relabeled and, worse, some keys were double-wired. This leaves me with two dead keys. I should've just stuck to the Japanese version... I guess some genious at Lenovo thought that it would be a good idea to put another space bar next to the backspace button, and an extra backslash key next to the space bar.
That, and recently I've been reading a lot of Xah. He has a lot of strong opinions on ergonomics and keyboard layouts and it's really interesting to see all the keyboards he recommends. Though I don't agree with a lot of his keyboard opinions.
So here's my ideal keyboard! (Sorry no pictures)
- We'll start with the Lenovo LaVieZ keyboard (it's not that bad)
- Above the row with the Esc and all the F-buttons (and PrtScr and ScrLock and Pause), there will be another row with media keys (mute/up/down volume, up/down brightness). What keys are not assigned media keys will be extra F-keys, and one key (probably upper right) will be a key designated (by OS software) for switching between Qwerty and Dvorak layouts (I'm trying to learn Dvorak!)
- Esc and F-buttons row will remain unchanged
- The number keys row will remain unchanged, though the FWD Space on the LaVieZ keyboard will be replaced with a delete and insert key (they're tiny on the LaVieZ keyboard anyway, and in the bottom row)
- I think the qwerty and the asdf rows can stay, including the Japanese-sized Enter key, although the CapsLock will definitely be a Compose key. (Maybe I'll have a different version with an American-style Enter key)
- zxcv row can stay, but the right Shift key should be two if not three squares wide. This will obviously push out the menu and the arrow keys, but we'll move those down.
- The bottommost row will have: Fn, Ctrl, Super(Win), Alt, Input Method switching key, Space bar (maybe smaller?), Input Method switching key 2 (for changing IMs within an IM), Hyper(Alt), Menu, Ctrl, and then the arrows keys scrunched. Also a forward and backward key like in the ThinkPads.
I started looking up how to make your own keyboard and found a really good guide by matt3o here. Maybe sometime in the future I'll have enough time and money to make it.
I noticed that I tend to write opinion pieces rather than instructional pieces.
Next time maybe I'll write about Ajax and more Emacs.