Archive for the ‘Development’ Category
-
Fixing Console (and Other) Colors in Aptana Studio 3
One thing that’s both cool and quite annoying at the same time about Aptana Studio 3 is the themes system.
Clearly, Aptana have been looking at editors like Textmate and fallen in love with the brightly colored and bold texts on a black background, and have tried to implement that in Aptana Studio 3.
The fact of the matter though, is that it just doesn’t work very well. To being with, Eclipse which Aptana Studio is based on, isn’t very text-on-black friendly – you can’t properly style the UI elements in Eclipse themselves, so you end up at best with a halfway-there result where non-text editor elements crave your attention being far too bright. Secondly, the theming isn’t properly carried through (yet?), so while there are themes that look fairly good with regards to editing Ruby, you’ll find that HTML, CSS, Javascript, and more are poorly themed, often leaving you with mostly uncolored markup.
While I do like Textmate’s dark style theme, I just don’t like the idea when it’s attempted to be implemented in Aptana (Eclipse). So I’ve switched to the “Aptana Studio 2.x” theme which is text-on-white and has more styling of non-ruby code, too. The problem then becomes that your terminal windows (for firing off console commands, gitting, raking and such) become text-on-white, too. And not just that, the text colors aren’t changed to accommodate the white backgrounds, either – so you get 100% on white, which is pretty much impossible to read. And adding insult to injury, there aren’t any apparent way to change the terminal and console colors using the theme editor.
Except, there is. You just have to add the tokens yourself. For fixing the terminal colors, so that you can have text-on-black terminals in a text-on-white theme, you just need to add some tokens to the list. You add a new token by clicking the small [+] button beneath the list of styling elements when in Preferences > Aptana > Themes:
As you can see, I’ve already added the tokens, they’re the ones starting with “ansi.”:
ansi.black ansi.white ansi.gray ansi.magenta ansi.cyan ansi.yellow ansi.blue ansi.green ansi.red
The full list of available tokens that can be added when missing – if you want to also add missing styles for other (markup) languages – can be found here, on the Current Theme Scopes page on the Appcelerator wiki. One thing that’s not mentioned on that page is that there’s a sort of hierarchy defined for the languages, where broadly defined tokens, such as constant.other.symbol (which isn’t even mentioned, btw.) is used where language-specific variants, such as constant.other.symbol.ruby, are missing. This makes it easier to create more generic cross-language directives using fewer keywords
-
Stacking Turds – Or How I Learned that Homeless People are More Fortunate than ASP.NET Professionals
DISCLAIMER: What you’re about to read may contain harsh language. It contains stories of feces-throwing gorillas and crying children. Opinions will be biased. Proceed at your own risk!
-
Folketingets nye web-tv-løsning
Så er Folketinget i luften med deres nye web-tv-setup. Jeg har haft mange fede projekter, men det her stiller sig sgu på toppen af bjerget.
Som bit-pusher kan man til tider godt få den tanke, at ens tilstedeværelse på planeten er pænt ligegyldig i det store hele. Så når man en sjælden gang imellem får chancen for rent faktisk at gøre samfundet til “et bedre sted” – her konkret udmøntet i at skabe større transparens i hvad vores folkevalgte går rundt og laver – ja, så er det ren kriller i maven og smil fra venstre til højre øre.
Vi (Arkena) har i et stykke tid nu streamet Folketingets såkaldte “continuity-kanal” live. Denne kanal er den samme som nogle kender fra kabel-tv, og består primært af et “best of”-udvalg af de seneste møder fra salen.
Den nye løsning har for det første et indholdsmæssigt scope, som er langt bredere. Der streames nu live fra Europaudvalgsmøder, samråd, retsudvalgsmøder, planlægningsudvalg osv. Live-udsendelser streames med DVR-funktionalitet, hvilket vil sige, at seere kan pause uden at gå glip af noget, spole frem og tilbage i udsendelsen mens den pågår, og man kommer nu aldrig for sent til at være med fra starten, selv hvis uret siger fire timer over mødetid. En overstået live-udsendelse har en turn-around-tid på under et sekund. Dvs. at der mindre end ét sekund efter en liveudsendelse er slut er en arkiveret on-demand-version klar til afspilning. Seere, som ser en live-udsendelse til ende vil opleve at playeren øjeblikkeligt skifter til on-demand.
Der kan søges til agendapunkter i videoer med milisekundspræcision, og f.eks. specifikke citater fra et 23 timer langt mødes kan indiceres og knipses frem i en player umiddelbart, ved hjælp af en tæt integration til Folketingets eksisterende metadatasystemer. Sagsakter, diktater osv. kan derved knyttes direkte til videosegmenter.
Et Flash-banner viser live-thumbnails over igangværende transmissioner.
Folketinget er derudover igang med at producere og transkode indhold til et omfattende arkiv. Altsammen til glæde for den kritiske og nysgerrige samfundsborger. Hvilket vi jo alle er
Rigtigt mange systemer er i spil og integrerer med hinanden gennem bl.a. webservicer og div. hooks, fra studie-videohardware over it-systemer på adskillige lokationer til den måske fedeste player nogensinde kreeret (af de megaseje og überprofessionelle drenge i Looper).
Alt i alt har det indtil videre været et fantastisk fedt projekt, fyldt med engagement, talent og kompetence. Watch out for chapter 2
-
Bistrot Bobo
Yay! Så er jeg officielt grafisk designer
Har netop launchet min nyeste kreation uden for lønslaveprædikatet, et site for gourmanden og gourmet-mageren Morten Køsters nyeste spisested, Bistrot Bobo.
Jeg har jo lavet tonsvis af sites og systemer i min funktion som systemudvikler og -designer, men det her er alligevel første gang, jeg har haft penslen oppe når det ikke var for at male væggen eller gulvet. Men yo, hey, bitches, Mr. Nerdy er nu også Mr. Creative. Photoshop? I knows it!
Samarbejdet med Morten og Anne Køster har været super. Måske syncede vi bare meget heldig ift. design-idéen, men det har været stort set on the money fra dag ét.
Sitet er klassisk KISS. HTML markup er minimalt. CSS er cascading (fucking weird, at majoriteten af CSS-folk ikke har fattet akronymet endnu, men insisterer på repetitiv, trættende crapkode, som er umulig at vedligeholde). jQuery anvendes til niceness og til at gøre det hele kompatibelt på alle browsere. Der er YUI-agtig navigation mellem sider – intet pagereload, men alle sider kan bookmarkes og en refresh holder state. Al grafik er udskiftelig. Slideshow er PNG’er, kanvassen er PNG’er, Bobo himself (aben) er en PNG, og alle dropshadows er ægte alpha transparencies. Faktisk er dropshadow på papiret den oprindelige skygge kastet af septembersolen fra mit vindue og fanget af mit Canon EOS 450D
Det er rudimentært, det er enkelt, og hvis jeg må prutte i min egen hornlygte, så er det ret REAL. Jeg er i hvert fald stolt – til dels for enkeltheden i koden (backenden er desværre ikke synlig, men 95% Xinha, 5% KISS), men mest af alt fordi jeg synes, at for en kodemand er det sgu ret godt gået sådan rent grafisk
Oh, i øvrigt: hvem i hele hule helvede har brug for Flash til andet end videoplayere i disse dage?
Et link til en anmeldelse (af bistroen): http://www.aok.dk/restauranter-cafeer/boernenes-bistro
-
Ruby 1.9.2 on Ubuntu/Mint with no Fuss and no Muss
Okay, so I was wanting to try out the newly released version 3.0 of Ruby on Rails, and I didn’t want any of that old and slow Ruby 1.8.x series that has been the default for years in Kubuntu, and probably any other Debian-based distro (I’m on Mint Isadora right now, and it’s the same thing here).
Why? Well, you can take that jRuby and stuff it, because even if it beats the 1.8.x MRI “vanilla” Ruby in performance, it comes nowhere near the x4 performance Ferrari run you get with Matz’ MRI Ruby 1.9.x. Besides, let’s move the fuck on people, the first preview of 1.8 was released in 2002, and 1.9 has been here for three years! Could we just try to not fall asleep, please?
Well, anyway, as this isn’t the first time I’ve tried to go the 1.9 way with Kubunuxumutuntu, I kinda expected it to suck, because I’ve never seen it actually just install and run as “ruby”. I’d always add the packages I wanted using apt, then do ruby –version, and be greeted with the all to familiar,
The program ‘ruby is currently not installed. You can install it by typing:
sudo apt-get install ruby…sigh. Thanks. Of course, this isn’t because ruby wasn’t installed, it’s because it’s installed as “ruby1.9.1″, gem is “gem1.9.1″, and so on and so forth. So do you go with the symlinking approach, possible breaking future package installs that try to install ruby 1.8.x as a dependency, do you try to configure your way out of it and aliasing commands in bashrc, or do you go Googling as usual?
Of course I go Googling, and this time I was actually in for a couple of surprises. First of all, Rails doesn’t even support Ruby 1.9.1, if you want 1.9, you have to go with the brand-new version, 1.9.2! The missing support for 1.9.1 surprised me, because I’d thought “they’d come around by now, what with 3.0 and all”. Anyone who’s tried Railing on 1.9.1 will know that you’d get into some serious trouble getting the gems up and running. Sooner or later you’d be staring at a compiler error taking all the fun and future hopes out of it all.
Second of all, I came across RVM, or the Ruby Version Manager. This sweet, sweet tool will not only automate the retrieval, compilation, and installation of any Ruby version available from Matz, IronRuby, jRuby or whatever, it will also do it non-intrusively, by installing everything in your home dir and no go fudging with system binaries that other, older, and quirky applications may depend upon.
And get this: That’s not all of it, you can also install any number of different revisions to suit all kinds of crazy apps and setups you may have that needs it. Sounds fussy? Fuck no, it’s a piece of cake
There are lots of other cool things it can do that, some that I don’t even understand, but either way, just go read about it, then go install it, and set up your Ruby version(s)!A couple of tips to add to what you read there:
- The documentation claims you need to install a 1.8.x branch before any of the other versions, but I found that doing “rvm –install 1.9.2” twice with a ctrl+c when it starts to download 1.8.x on the first attempt will install just the 1.9.2 branch in the second attempt without any issues (yet).
- You probably want to set a Ruby version as the default after you’ve installed. I did “rvm –default ruby-1.9.2“.
- Remember to follow the directions on packages you need to install, and note that git-core should probably be installed before you start doing anything. You don’t really need vim, either, unless that’s your preference. I use Aptana.
Let’s go Railing 3.0-style on the 1.9.2 Ruby branch motherfuckers! Yeah!
EDIT: When installing gems, note that linecache and ruby-debug-base should be installed from “linecache19″ and “ruby-debug-base19″ for 1.9.x rubies. If you have issues while building mongrel, try “gem install mongrel –pre”. Also, http://isitruby19.com is worth consulting when something fails to install
-
Be Gone, Stupid Aptana Studio 3 Folders in My Home Folder
What’s the deal with these automatically, and persistently, created Aptana directories – the ~/Aptana Studio 3 folder, and the other one, the ~/Documents/Aptana Rubles? I mean, hey, fair ’nuff to use some defaults for the first run, we’re used to that from Eclipse, but contrary to Eclipse, we can’t just change this. You’ll find that changing the default workspace and asking to use it and never ask again will do nothing of the sorts. On next startup, same shit, different day
Anyway, fear not: It’s simply a matter of changing a couple of lines in a couple of files.
#1: “AptanaStudio3.ini” in the Aptana program folder. Here we get to define the rubles folder. At the end, add a line like this:
-Daptana.ruble.user.location=/home/daniel/.aptana-rubles
Windows users would write something like C:\Path\to\My\Shizzles” instead. I prefer to keep this folder hidden, and most definitely not in my Documents folder. These ain’t exactly documents, ya know
#2: “config.ini” in the configuration subfolder of the Aptana program folder. This one sets the workspace folder. Change the line that resembles this to a location to you liking:
osgi.instance.area.default=@user.home/.aptana-workspace
Again, I like to keep this folder hidden, though my projects go into ~/Projects. You don’t have to put your projects in the workspace folder, you know
That’s it! Get rid of the old annoying cruddy folders, restart Aptana, and watch as the folders are not recreated. Yay, freedom FTW!
EDIT: Removed quotes around path to rubles location (Thanks, Andrey)
EDIT 2: Changing these files does not actually change the current workspace – it just makes Aptana stop insisting on using the ini files’ suggestion by default. So to make sure everything goes according to plan, do:
1) File > Switch Workspace > Other, and select the workspace folder that you chose as your new one in the ini file (you can also copy the contents beforehand if you have settings you wish to keep)
2) Preferences > General > Startup and Shutdown > Workspaces, and remove the old reference.
Restart, and if all is well, just delete the old dir.
Recent Posts
- If This Ain’t Art, I Don’t Know What Is
- Creating Missing Keyboard Shortcuts in Applications on Mac OS X
- Get Back /var/log/messages in (K)ubuntu 11.04
- Boosting Windows 7 File Move Performance by Up to 10,000%
- Leaked Screenshot of Windows Server 9 Login Screen, In-UI Annotations new Design Strategy


