Freedom Systems vs Safety Systems

Systems — Dillon @ 3:49 pm

Code Craft had an extremely intuitive post about Freedom Languages vs Safety Languages. He covered what is popular vs what is fringe, where the party-lines are drawn and (imo) almost made an analogy for safety within the USA.

I’ll sum it up: You’re safe or free but rarely absolutely both.

So of course, me, the junior (mid-level if I’m around monkeys) programmer probably can’t offer the same level of insight into software. However, I can make an attempt to “port” Code Craft’s post into Freedom System vs Safety Systems.

Can’t we all just get along?

Windows (safety) vs Mac (freedom). Windows vs Linux. Linux vs Mac. A horrific never-ending battle and argument to plague the Internet and geek circles forever. But even within the Linux community, Ubuntu vs Gentoo. Debian vs Gentoo. Redhat (safety) vs Gentoo/Ubuntu/Debian (freedom). Advocates of safety usually point-out the use of their choice OS in the business world thereby enabling them to get a job. Advocates of freedom platforms usually point-out weaknesses and flaws of the safety platforms.

Switching a business to an all-Linux or all-Mac platform would be a giant risk. It’s the opposite of safe. However, getting into bed with Microsoft is not very freedom-enabling. Vendor lock-in, security problems and lack of diversity in tools get you into a unified headache.

Protect me from myself

So what to do? I don’t have time to worry about platforms. I want to move on to the fun stuff. User space. In user space, I get to write apps, play games, make money and do all the things that I’m supposed to do above and beyond building boxes all day. I’m not an OS loader so “[insert vendor here], help me get on with my day.”

Self-updating systems. Self-updating apps. Warning dialogs, system file permissions. They are all mechanisms that state “I don’t have time to know it all”. I don’t have to track 0day exploits full-time to keep my workflow running. I don’t have to stress that as a normal user I can’t delete a critical file. Almost all systems protect the users from harming themselves (or they should).

However, even in Windows Safe Mode, the user can still do damage. You can delete NTLM in XP (and others) and the system won’t boot. You can delete most of the C: drive with non-administrator rights. In Linux, things are a bit harder but in common practice people actually getting things done usually have root or full sudo rights. The same is true in OSX, the productive user needs root level access to get things done. So where is the happy medium?

Well it’s a bit inverse of programming languages. Actually the safe thing to do in the Enterprise is to enable the user to screw up their own box. It’s more IT tickets but it’s usually less of a headache provided a small-enough organization. In my experience in software and integration, most of the time we get root anyway. The IT department will segment a section of the network off and it’s our own sandbox to wreak havoc. At the same time, we operate much faster than if we can’t even set the system time as it is on Windows with no admin rights.

Me too

Kevin Barnes compared a C-like for loop to a Ruby for loop as evidence that safety languages are safe because they are very similar. So do systems on a broader scale suffer from a copy-cat mentality. DOS became Windows and OSX borrowed some ideas from Windows. Minimizing all open windows is Windows Key+M on Windows and on OSX it’s Apple Key+M. But simple asthetics are not all. The fact is, even files and folders are all copied concepts. Command line commands are very similar. For example, most OS’s have similar commands to change into a subfolder and view a file:

Linux

$ cd docs
$ more resume.txt

Windows

C:\> cd docs
C:\> more resume.txt

Mac

$ cd docs
$ more resume.txt

Of course where the Freedom Factor comes in is with the more complex and arcane things like building software. On RedHat and mainstream Linux distros, building an rpm is usually unnecessary and even complex build processes are point and click with Ubuntu. Freedom advocates of Gentoo or Debian would cite performance differences between self-built code and generic-built code.

“Me too” in platforms is very much a function of copying, standards and memes.

Ring the bell for freedom

So in conclusion, Kevin @ Code Craft has a much easier time comparing languages vs systems. Systems are generally not a science and higher-level which means they are harder to express in snippets. Systems are best described in diagrams and concepts versus strict syntax. So he is fortunate to be a blogger in a discrete subject such as software development.

Although I tried my best to copy his post, I don’t think it really turned out that way. I think the better approach would be to take gaping void’s sex vs cash theory and apply it to technology. It’s really what Kevin should have done to begin with. A Sexy technology is very much full of freedom (Ruby, OSX, OpenGL) whereas Cash technology is very much full of business and work (Java, Windows, DirectX).

Parabola

C/C++,GameDev — Dillon @ 7:44 pm

parabola sketch

My goal was to create the curves above. I knew if I could draw it then I could move a box or game object along that path. It took me about two weeks of casual time and many math questions posted to yahoo answers.

The problem is, implementing a math formula in C++. It’s just not as pretty as the equation and any algebra tricks are hard to express in code. Not to mention remembering algebra period. ?

Eventually, I ended up with this. I specified the starting point, the ending point and how tall I want the curve. A series of horrible equations builds the rest into a vector of x,y point structs. There’s an LOD thing too that says how pretty the curve should be.

parabola3

Of course, it’s pixilated and kinda ugly. I tried anti-aliasing it but it doesn’t look much better. Also, I might have some math issues because in some places there seems to be small humps. I might be running into precision problems again. ?

Overall, I’m pretty exhausted. I don’t know what my next project will be, I don’t know if I want to make more of a game that’s interactive instead of these little graphics tests.

Also, C++ is pretty ugly imo. It’s used everywhere, I understand but I might pick up an actionscript book and see how much of this graphics stuff could be wrapped up in flash. I bet you can do some cool low-level drawing in flash; and then it’d be more ‘portable’ than an OSX app.

Anyway … it’s a thing of goddamn beauty for now. Except the code, which is ugly, untidy and probably doesn’t compile by itself. I’ll update it so it’s stand-alone.

Macbill Intel

Blog — Dillon @ 10:40 pm

macbill intel
No credit go to me, everything goes to Macbill. I couldn’t get it to build a ubin for the Macbill source and I couldn’t find one anywhere.

So here’s Macbill for Intel.

Upgrade fest.

Blog,Unix — Dillon @ 5:48 pm

Following an upgrade guide on gentoo’s lovely doc site. GCC was majorly out of date (3.3 to 4.1.1) and hopefully you can still read this after all is said and done.

Right now, apache is in a weird state and I need to emerge a ton of crap:

# /etc/init.d/apache2 restart
* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 6 of /etc/apache2/modules.d/70_mod_php.conf:
Cannot load /usr/lib/apache2-extramodules/libphp4.so into server: libXrender.so.1: cannot open shared object file: No such file or directory

Need X11 and a million other things put back on. Cobwebs from leaving it alone for so long.

lstat test

C/C++,Unix — Dillon @ 5:38 pm

Following an interview question that was extremely hard I went to `man lstat’ and tried to code up a test just based on system documentation. It was not entirely successful, however after a tip-off from an online resource I came up with this.

(more…)

Animated Box

C/C++,GameDev — Dillon @ 11:11 am

I’m very, very early on in the effort of this graphics/game test. But essentially I wanted to write down where I’m at with Xcode, OpenGL and learning C++.

Learning C++ by starting with OpenGL is very stupid. I admit this. It’s the wrong way to start out. It’s like learning how to walk by jumping out of a Dodge Viper. But I want to get beyond the Hello World books and after trying for two or three years in my limited spare time, I’m finding that being thrown into the fire is somewhat motivating. I learned Java the same way (not that I’m a master of that either), I gave myself a goal that I really wanted to accomplish and the rest just fell into place because I couldn’t think about anything else.

Such is my animated box. I want to move a box in a really smart way. Not just some Box.setX(i++); Box.setY(j++) in the main() method but something smarter that would enable me to move two, four or one-thousand boxes in the future.

animated box

More coming…

xcode glclearcolor

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2012 SQUARISM | powered by WordPress with Barecity