Quick Quip: Date Format

I think the hubbub over date formats is stupid. In America, it is thus:

> Month/Day/Year

In the rest of the world:

> Day/Month/Year

It should be greatest significant digit to least:

> Year/Month/Day

Which is how I write the date whenever possible (though I have gotten people confused writing “2012, November 12″).

Grid Cypher

I was recently attempting to solve the cyphers presented by ToTheArk’s newest video ([Surveillance](https://www.youtube.com/watch?v=cFQKzg-yXgo)) when I came up with an idea (I wasn’t the only one).


That is the 9×9 cypher that formed the basis of my theory. At the time, the message contained only pairs of numbers [0-9]. I went to work brute forcing solutions. When that failed, I tried altering the starting letter of the grid. That failed too. Finally, I tried arbitrarily increasing the size of the grid, at one point getting to 100×100 (but still only using the upper-left most 9×9 as coordinates). These all failed. Ultimately, this didn’t even turn out to be the solution, but when I figured that out I had already written most of the script that I’ve posted below.

if [ “x$F” = x ]
elif [ “x$F” = “x!” ]
echo “ibase=16;
$(echo $F | hexdump | tr [a-z] [A-Z] | awk ‘{print $2}’)” | bc
function grid
while [ $A -lt $Y ]
D=$(echo $(($A))|sed ‘s/^\([0-9]\)$/0\1/’)
while [ $Z -lt $X ]
if [ $Q -gt 90 ]
ROW=$ROW”…”$(echo -e “\x$(echo “obase=16;ibase=10;$Q”|bc)”)
let “Z++”
let “Q++”
LROW=$(echo $ROW | sed ‘s/^..//;s/\.//g;s/\(.\)/\1,/g;s/,$//’)
let “A++”
for Z in ${GRID[@]}
echo ${Z[@]}
function decode
GRID=($(grid $2))
if [ x$1 = xv ]
for ZZ in ${GRID[@]}
echo ${ZZ[@]}
echo ${#COORD[@]}
for XX in ${COORD[@]}
X1=$(($(echo $XX | sed ‘s/,.*//’) – 1))
Y1=$(($(echo $XX | sed ‘s/.*,//’) – 1))
X2=$(($(echo $XX | sed ‘s/,.*//’) – 1))
Y2=$(($(echo $XX | sed ‘s/.*,//’) – 1))
R1=($(echo ${GRID[$Y1]}|sed ‘s/,/ /g’))
R2=($(echo ${GRID[$X2]}|sed ‘s/,/ /g’))
echo $PHRASE1
echo $PHRASE2
# Encode
function encode
GRID=($(grid $2))
if [ x$1 = xv ]
for ZZ in ${GRID[@]} do echo ${ZZ[@]} done fi COORD=($(echo $CO|tr [a-z] [A-Z]|tr -dc A-Z |sed ‘s/\(.\)/\1 /g’)) for XX in ${COORD[@]} do YP=$(($RANDOM%${#GRID[@]})) COUNT=$(echo ${GRID[$YP]} | grep $XX |wc -l) while [ $COUNT -lt 1 ] do YP=$(($RANDOM%${#GRID[@]})) COUNT=$(echo ${GRID[$YP]} | grep $XX |wc -l) done LINE=($(echo ${GRID[$YP]}|sed ‘s/,//g;s/\(.\)/\1 /g’)) XP=0 for YY in ${LINE[@]} do if [ $YY = $XX ] then echo -n “$(($XP+1)),$(($YP+1)) ” break else let “XP++” fi done done echo } # # Do Encode # function doencode { if [ “x$CO” != “x” ] then if [ x$BRUTE = x ] then encode v $F else while [ $F -lt 90 ] do encode a $F $3 let “F++” done fi else echo “tta e X Y BASE msg” fi } # # Do Decode # function dodecode { if [ “x$CO” != “x” ] then if [ x$BRUTE = x ] then decode v $F else while [ $F -lt 90 ] do decode a $F let “F++” done fi fi } # # Grid # function dogrid { GRID=($(grid $2)) if [ x$1 = xv ] then for ZZ in ${GRID[@]} do echo ${ZZ[@]} done fi } # # Help # function help { echo tta command x y root message } # # Command Menu Parse # if [ “x$XM” = xe ] then doencode elif [ “x$XM” = xd ] then dodecode elif [ “x$XM” = xg ] then dogrid v $F else help exit fi

Things I don’t like about OSX

I recently started a new job, and my desktop at my workstation is a Mac, running OSX 10.6. This is the first time I’ve spent more than an hour on a mac since 2nd grade, when I played with an Apple II. The process has been a constant sting of Google searches (I had to look up how to take a screenshot too, because it’s 100% different from every other OS as well).

[![One page of about 50.](http://michaellubert.com/blog/wp-content/uploads/2013/01/Screen-shot-2013-01-14-at-2.29.32-PM-300×241.png)](http://michaellubert.com/blog/?attachment_id=32)
One page of about 50.

In my searches, I’ve found that, generally, anybody who A) can code for OSX and B) has used ANY other operating system has created apps for OSX to mimic features that Apple saw fit to ignore/break the convention of/spit on. Also, these developers charge, because what are you going to do, install Linux? On your Mac? Anyway, I came across the following article, which echoed my sentiments exactly: [A Small Matter of Programming: The trouble with OS X window management](http://blog.wuwon.id.au/2012/06/trouble-with-os-x-window-manager.html).

I’ve decided I should also compile a list of conventions that I have come to expect from years of working with Windows 95/98/XP/7, GNOME, KDE, Unity, and Black/FluxBox shells which OSX breaks.

1. The green plus sign is inconsistent. Sometimes it maximizes, other times it moves a window to the left side of the screen, and the app then can’t be resized.
2. The inconsistency between apps and the OS. Where in Windows and Linux I would use Ctrl, OSX inexplicably uses Cmd. Ctrl-C, Ctrl-V, Ctrl-X, Ctrl-A all become Cmd-Whatever. 1. This breaks focus when working in screen, as it’s Ctrl-A Ctrl-[0-9] to pic a window, and then Cmd-C to copy text, then back to Ctrl to switch windows, then back to Cmd to paste, and then back to Ctrl for Ctrl-C. It’s needless movement, and the Ctrl combos aren’t even USED by anything.
2. Also, in Firefox, it’s Ctrl-Tab to change windows, but Cmd-W to close and Cmd-T for a new tab. I also can’t fathom why they make Cmd-d, which were it Ctrl-d anywhere else, add a bookmark instead of going to the Titlebar.
3. Home and End keys do not behave like in other operating systems (I had to download [KeyRemap4Macbook](http://pqrs.org/macosx/keyremap4macbook/))
4. Programs continue to run until you quit them. This can cause confusion, as closing the last window doesn’t quit. I’ve found if I open a large PDF in Finder, then close the PDF, Finder can hold on to the memory and cause a noticeable slowdown.
5. Cmd-Tab and the Dock only show one icon per window, and offer no way of knowing what is on which desktop, or even if a program has more than one window open.
6. Yes, I know Cmd-~ can switch between windows of the same application, but this is 2 steps (switch to app, and cover whatever you WERE working on, then cycle through open windows) to fix a problem that should require one (alt-tab to the correct window).
7. Finally, I hate the menu bar at the top. Menus belong ON apps, in my opinion. Unity does this too, and it’s annoying to have a small app open, then you have to scroll up to the top of the screen to use the menu.

I know a lot of this is provably grandfathered in, or somebody has some sort of design reason for it, but computers aren’t in a vacuum anymore. Everyone copies everyone else. In my last job, I worked on a Linux laptop to remote into Windows server, then went home to a Linux media center and a Windows gaming computer, and had no problems. After 2 days with OSX, I was having trouble getting around my Ubuntu 12.10 laptop because my brain is starting to overwrite the key combinations of programs I’ve used for years. I wish OSX would allow you to [change](http://www.howtogeek.com/howto/ubuntu/assign-custom-shortcut-keys-on-ubuntu-linux/) how these things [behave](http://www.autohotkey.com/). As is, I’d have to buy a $14 piece of software for a work machine. Good luck getting that charge approved.

I had decided a few years ago that when I purchased a new laptop, I’d buy a mac. I appreciate their quality control (although in recent years this may be faltering due to their single-piece designs), and I wanted a laptop that would last another 5 years. I’m glad I didn’t buy one this Christmas, because it would have been a nightmare, and my Acer ultrabook running Ubuntu is just as slick, for 1/3 the price.






### [Continue to blog](http://michaellubert.com/blog/?page_id=22 “blog”)

Michael Lubert:

– is .
– is currently a citizen of Chicago.
– is in possession of a [resume](http://michaellubert.com/resume.pdf).
– is an avid consumer of media.
– is able to solve a Rubik’s Cube, but not in any kind of hurry (avg. solve time of 5 minutes).
– enjoys rock climbing.
– dabbles. He’s a dabbler. Dabbling.
– has a [twitter](http://twitter.com/mlubert), [facebook](http://facebook.com/michaellubert), [youtube](http://youtube.com/adanufgail), and [linkedin profile](www.linkedin.com/pub/michael-lubert/24/5ba/937).
– does not have [40 subscriptions to Vibe](http://circlelinego.com/drop/ron.png).
– programs.
– knits.
– has [defeated level 7 of Artemis](http://www.youtube.com/watch?v=-x8IpkXX4nU).
– collects business cards. And he’d love to have yours…


– mlubert@gmail.com
– @mlubert
– XBLA: Oloramar
– Steam: Adanufgail

Selected Articles:

[On creating memorable passwords](http://michaellubert.com/blog/?p=82 “On creating memorable passwords”)