Linux — mmmm back in a pure programming environment (minus OS independent monkey work)

Run linux to administer a linux server. I’m running the same OS on my desktop as my server partition — doesn’t it make sense to do so?

To me it’s more about the focus I get from switching over. Minimizing distractions is the goal of programming. Working on Ubuntu puts me in the same place as my server, not cluttered with a completely different OS, remotely working with a combination of putty terminals and or tortoise SVN on windows.

Nah. This is much better.

It helps that there are all of daft punk’s albums on this side of the border. What better to drown out all noise?

Alright, here we go.

Linux — Edit files on your server directly from your desktop with SSHFS

Fantastic. I migrated our project to a production server environment and started to lose my workflow as I was forced to use many terminals at once.

At home, I tend to have a combination of 4 terminals up and a few GUI editors as well. Some things are better done with one, and some with the other. I use the terminals for directory surfing and making small changes. While I use a GUI app like Kate that splits into 6-8 pieces to work on bits of code.

Anyways, my solution right now is to mount my server onto my local filesystem.

If you are on Ubuntu, just apt-get install sshfs, and mount a directory just by typing:
ssfhs USERNAME@IP:/PATH/TO/DIR /MOUNT/PATH You might have to specify a port with -p if you are using a non standard ssh port (you should).

So, I’ve got my server mounted on my desktop. Fantastic.

Unmount with
fusermount -u /MOUNT/PATH

Ubuntu — Running Two Firefox Intances on Dual Screen (Seprate X Screen — not LargeDesktop or TwinView)

There are benefits and downsides to using separate X screens for dual screen setups vs a “large desktop” which just means the computer thinks there is one desktop, with two monitors showing the same desktop.

Separate X screens means you have an entirely different screen on each monitor. This is useful to me because I can have two SETS of workspaces on each screen. My smaller monitor to the left has 3 workspaces, the large 30″ on the right has 6 screens. I keep my browser, chat, music on the left monitor, and it doesn’t move no matter how much I switch around on my main screen.

With a large desktop or TwinView, you would switch both screens by switching workspaces. So having that second screen doesn’t help THAT much if you already have a large main screen as you’d still need to switch around just to look on your second screen.

Anyways, FireFox complains that you an instance is already running if you try to run firefox on each screen. To get around the problem, start firefox with -P, which runs the profile selector.

Create a new profile and there you go, you have a new firefox instance running on your other screen.

From now on, just start firefox by running firefox -P.

Issues embedding OpenType Fonts in Flash

Fonts are a real pain to deal with in flash. To do anything useful with them you have to embed them.

For example, you can’t change a textfields alpha without embedding it, or using some hack like turning it into a bitmap and changing the alpha on that. Look at this previous post for how to embed the fonts for alpha control.

I have ttf fonts working as such:
[Embed(source = "C:/Windows/Fonts/Verdana.ttf", fontName = "verdana")]
public static var verdana:Class;
Font.registerFont(AssetManager.HelveticaULE);

but OTF won’t work in the same manner. I have tried using systemFont as well, but this is also a pain for various reasons.

I am simply trying to convert these OTF fonts to TTF, and can’t find many reliable windows programs. Widows makes everything a pain.

FontForge allows you to convert easily but naturally it is open source and Linux. I am working on installing Cygwin the project that tries to create a Unix like environment on Windows.

http://cygwin.com/

But this is another pain. These days I’ve been wondering how useful a Mac would be at this point.

I wish I could move entirely to Linux.

My laptop is a dual boot machine with Vista / Ubuntu Gutsy. My Desktop has Kubuntu Gutsy after a little accident killed windows on it (the wind knocked over one of my drives that was in a RAID).

Doing anything on the computer is more efficient and faster on Linux. I always say that a strong motivation for buying overpowered computers is it saves you a lot of frustration from hanging windows. You clicked close 30 seconds ago.. its still “thinking”. You opened a folder.. its taking ages.

Only my desktop with an overclocked E6600 Core 2 Duo + 4GB ram doesn’t reliably hiccup on Windows. Windows reliably hiccups in 99% of environments. You don’t even realize how bad it is until you try Linux.

Everything is snappy. Stuff opens the instant you click on something. It stays this way for as long as your computer is on. Imagine that? It is very difficult to quantify this snappiness. And you don’t even need a great computer. I get a huge productivity gain just by not being frustrated.

So, on that note, the second greatest thing about Linux is the productivity. I am extremely productive on this machine. Everything is a shortcut away. All of the open source programs are literally one command away from installing on any machine. I note below that text-based computing has easily documented productivity gains across the board. It’s easy to see why.

Alt+F2, Konsole, Enter
sudo apt-get install Skype

For development, my workflow is so much faster on Linux. For developing Django I am probably around 300% faster on Linux.

It helps that the same architecture is used for production servers. Linux revolves around terminals, and coding does too. Alt+F2, Konsole, Enter. Navigate to my Django directory. Type Screen. Ctrl A + C to make a new sub screen, start editing settings.py, Ctrl A +n to go to next screen, edit urls.py

Need to test the dev server? Alt+F2, Konsole, Enter, tab complete my way to my project folder, python manage.py runserver. Perhaps Super+N to turn the window negative so that the dev server stands out.
Ctrl+alt+shift+right to move the window to the right workspace, ctrl+alt+left to move back. Alt+F2, firefox, Enter. Check my dev server.

Ctrl+alt+ arrows let me switch between my 9 virtual screens. It works perfectly. I’ve tried a few windows versions and they are not worth the hassle. It doesn’t solve the problem of everything slowing down even on ONE screen, anyways.

It is entirely documented what kind of workflow gains you get from switching from GUI to Type based computing.

It also makes it infinitely more fun. Windows is a chore, Linux is something I could actually enjoy day to day. Ubuntu put fun back into computers.

There are tons of extremely useful programs only on Linux as well. Open source goes a long way into developing what people WANT/NEED/FIND USEABLE.

Every program seems to fit in the operating system.


So why can’t I completely switch to Linux?

My main reason is Adobe products. Adobe hasn’t ported their products to Linux. WHY!?
I need Photoshop and to a lesser extent Illustrator. I also use FlashDevelop which is an open source windows only Flash development tool. It felt so nicely done and felt so “Linuxy” that I assumed I could get it for linux. Nope!

Learning the Linux alternatives will take time. I’ve used GIMP and it certainly is all I need for web graphics but there is just a lot to learn.

One of the main reasons I want a mac is to have more Linux like functionality while still being able to use Adobe products.

I am a total convert to text based computing. I now realize how stupid it is to click through folders to find something. Click through folders to open an image, modify it in photoshop, click through folders to save it, etc. It’s an utter waste of time and doesn’t help by being annoying. To spend a few seconds moving your eyes across the screen looking for a particular folder is really, really, dumb. You just don’t get it untill you try something else that works infinitely better.

Linux is only getting better, and I hope Adobe starts selling Linux ports of their products. Thats the only thing I need. Otherwise I lose quite a bit from the fact that I have to shut down windows and log into Ubuntu just to use it. Therefore, if I’m designing something, and I want to use my email, I stick to windows and put up with the slowness. It wouldn’t make sense to log out every time I use something non adobe.

There is a fair learning curve, but if you don’t think of your computer as magic, you can learn it, and you will thank me.

If you do think your computer is magic, you won’t be able to understand it. The most recent releases are about as user friendly as it gets though. It most likely won’t have a problem detecting and installing the right basic sound drivers/video drivers and you can be on your way.