A Golden Ratio Tool

iframe: <a href="http://toki-woki.net/p/golden-ratio/">http://toki-woki.net/p/golden-ratio/</a>

I wrote a quick and sim­ple golden ratio tool (ded­i­cated page). Basi­cally it helps you find “golden ratio neigh­bors” for a given num­ber: every num­ber in the list divided/multiplied by its neighbor = φ.

Pretty straight­for­ward but could come in handy. I’m aware it could be improved; if you have suggestions…

Hey! – A Lego Table

When I moved in I bought an IKEA Ramvik table and while trav­el­ling this sum­mer I had an idea (don’t ask why): dec­o­rate its top with Lego bricks used as pix­els. Here are the steps I went through. If you don’t care about those steps and want to see a nice time-lapse video, scroll to the end of the article!

Lego bricks

First things first. What are the Lego brick sizes and col­ors avail­able? Oddly enough this ques­tion is not that eas­ily answered. Prob­a­bly because Lego’s site is crappy, or because nobody really cares… I even­tu­ally found Brick­ipedia which hap­pens to be a much richer resource than the offi­cial ones. Every­thing I was look­ing for was there: the Lego “unit” is 8 mil­lime­ters and the color palette is pretty sim­ple.

Table specs

Know­ing my table size I had var­i­ous options, depend­ing on the “pixel size” I’d choose. Of course the num­ber of bricks (and the price) would also vary. So I cre­ated a dynamic spread­sheet on Google Docs that’d do the cal­cu­la­tions for me… Here it is, with all the options pos­si­ble (French, sorry).

iframe: <a href="https://spreadsheets.google.com/pub?key=0AmyvU-n2aOBpdG5oNUN6UW0xcUJ4a2E3eXFrTTJIVnc&amp;hl=en&amp;output=html&amp;widget=true">https://spreadsheets.google.com/pub?key=0AmyvU-n2aOBpdG5oNUN6UW0xcUJ4a2E3eXFrTTJIVnc<span class="amp">&amp;</span>hl=en<span class="amp">&amp;</span>output=html<span class="amp">&amp;</span>widget=true</a>

I chose the 4x4 option, quite cheap and still offer­ing a cool num­ber of pixels.

Design

36x16 pix­els of free­dom, that’s it. I tried lots of dif­fer­ent designs, from lo-fi pho­tos to pixel-art draw­ings. I decided to go for a Heavy Oblique Futura.

Actual size:

Look­ing good.

The Lego palette

I set my type to white, on a black back­ground. The anti-aliasing process cre­ates gray-scale pix­els to smooth the curves, which is great, but Lego bricks aren’t avail­able in all col­ors! To have a real­is­tic pre­view of what it would look like I had to cre­ate a Pho­to­shop Color Table match­ing Lego’s gray-scales (if you’re inter­ested, just ping me [UPDATE: here they are]). Here’s a com­par­i­son between Photoshop’s default gray-scales (left) and Lego’s palette (right):


You may notice that Lego’s black is a lit­tle bit light and the grays are yellowish.

Time to order bricks!

Already? Nope, not that fast. Before order­ing I had to know exactly what to order, that means count­ing the pix­els. Well, I’m not this kind of guy. I’m a devel­oper; I hate repet­i­tive chores, you know.

So I fired up Flash Builder and came up with Palet­te­Counter a sim­ple, Open­Source, app to count pix­els of each color. I also added some kind of “assem­bly instruc­tions gen­er­a­tor” to help us build it. Handy.

Time to order!

Really? Yup. I placed an order on lego.com’s Pick A Brick and received it a cou­ple of weeks later. Yay!

Let’s do this

I’m not going to describe the process (that hap­pened this sat­ur­day), just have a look at this time-lapse vid. 1020 pics shot in about an hour, yummy. Thanks to Céline and Julie for help­ing out!

SVG to RaphaelJS

While redesign­ing this blog I wanted to keep the “one color per post” con­cept I had in the pre­vi­ous ver­sion by chang­ing (tween­ing) the logo’s color accord­ingly to the arti­cle being viewed (or scrolled to). I rapidly real­ized I couldn’t achieve this with just HTML+CS+JS and I didn’t want to use Flash (mainly because of iOS devices but also to avoid load­ing a SWF file on every page).

I remem­bered hear­ing — a few months ear­lier — about Raphaël (a JS lib to ren­der vec­tor graph­ics). At that time I found the con­cept really inter­est­ing but couldn’t see where to use it.

OK, so I know what I want to do, I know the tools I’ll use, but how do we do that? Raphaël is cool, but its syn­tax looks a bit cryp­tic at first. It says it han­dles SVG, and — guess what — Illus­tra­tor can export to SVG. We’re get­ting closer…

SVG is XML, but Raphaël doesn’t eat XML, it eats a spe­cific syn­tax meant to be com­pat­i­ble with SVG and VML. Hum… This is when I fire Flash Builder and start writ­ing code. The goal: accept an SVG XML file as input and spit some “Raphaël-compatible script” out.

Boom (plus a lit­tle demo of an output).

I then sim­ply had to export my Ai logo to SVG, open it in SVG2RaphaelJS, copy paste the out­put, and wire all that to the scroll/color tween­ing logic. Pretty easy.

Every­thing worked and looked nice on all browsers and OS’s but I real­ized the sole idea of hav­ing a logo chang­ing col­ors didn’t work that well. For purely visual rea­sons. So I dropped it from my theme and rolled back to the black PNG ver­sion you can see right now.

The good thing is, the tool works pretty well (at least with Illus­tra­tor SVGs) and is Open­Source. Either use it or mod­ify it, and tell me what you think. I did this in a hasty fash­ion and I prob­a­bly won’t use it a lot, so don’t expect updates or bug fixes… But if you feel like improv­ing it, please do so!

Evnt — Custom AS3 Event File Generator

I recently started work­ing with Robot­legs on a daily basis and I’ve never had to write that much cus­tom event classes, so I felt like it was start­ing to be a lit­tle bit bor­ing… That’s why I wrote a pretty basic/simple app that does hard part for you!

Sim­ply enter you cus­tom event’s class name and pack­age, drop in some con­stants and prop­er­ties: you’re all set!

Pro-tips:

  1. Reorder the con­stants and prop­er­ties by drag­ging and drop­ping them
  2. Use cus­tom types for the prop­er­ties, imports will be taken care of for you
  3. Hit “Copy to Clip­board” or “Save As…” for a quick export!

Project is brand new so it might require some fixes or improve­ments… If you have ideas, please share!

And before you ask: no, it wasn’t writ­ten with Robotlegs… But it’s Open­Source so if you want to take a spin and write the RL ver­sion of it, you’ll be able to do so!

Hope this helps!

Fotolia Desktop

Hey! Another free AIR app! This time that ain’t no side project I made on my free time for some obscure users, but rather a big thingy for a big com­pany. Namely Foto­lia.

I did all of the cod­ing part (Action­Script 3, Flex 4) and Steaw is respon­si­ble for the UI and all graph­ics. The app is basi­cally a solu­tion for power-users, pro­vid­ing most of the func­tion­nal­i­ties of the web­site and adding some more (such as direct down­load and local library). Allow­ing you to search, browse pre­view and buy all types of medias, includ­ing video and vectors. You can also log into your account and store your favorites in a light­box or cre­ate and fill gal­leries.

This is my first multi-lingual app: to this day it pro­vides 13 trans­la­tions includ­ing Japan­ese, Chi­nese and other funny look­ing languages!

Flex 4

This is also my first big real-life project with Flex 4 and I have to say it’s way better/easier than Flex 3. Really. What changed my life is the way it han­dles states and com­po­nent cus­tomiza­tion via skins… Oh boy, this is easy!

AIR 2.0

Yep, using the brand new AIR 2.0.2, buddy. What for? Mainly for global error han­dling and the almighty open­With­De­fault­Ap­pli­ca­tion (for both folder and medias). I’ve also heard this ver­sion of the run­time is faster and lighter, and we all like that.

Open­Source

As for every project I work on, I try to have some Open­Source bits so that any­one can ben­e­fit from the work and time I spent on it. I asked Foto­lia if the AS3 API I was going to write could be OpenSource’d and guess what, they accepted. So here it is, based on the as3-rpclib and on the as3 Sig­nals logic: fotolia-as3-api. I imple­mented most of (if not all) fea­tures of their offi­cial API so build­ing an AS3 app off of that should be pretty easy, do so!

Go get it!

Yeah, go get it.

Dok — AS3 Doc. UI

Meet Dok, my lat­est and nicest AIR app to this day!

Always look­ing for help when writ­ing AS3 for Flash, Flex and AIR? Think Adobe’s ref­er­ence is rich but brows­ing it sucks? Well, I did too. So I wrote this lit­tle thingy that loads, parses and caches help pages and then presents them in a slick and quick UI!

Since this app is only intended for devs and there­fore may not be very inter­est­ing to oth­ers, I decided it should look good. So I tried my best and worked hard on those pix­els and styles (col­ors and tex­tures inspired by that sweet clock)… Jump to the project page for life-size screenshot!

This project is absolutely Open­Source, from top to bot­tom. AS3 classes, MXML, Illus­tra­tor and Pho­to­shop files, PNGs and so on… Help your­self.

AIR: ELS slow?

This post is a techy one, so if you don’t write AIR apps or if you think this wouldn’t be enough to show off dur­ing cof­fee break I rec­om­mend some­thing fun­nier.

Work­ing on a big fat AIR app (more than 400 Mb) I noticed some­thing quite strange: using Encrypt­ed­Lo­cal­Store get/setItem meth­ods hap­pened to be slow, I mean very slow, but like, slow as hell (like 5 to 10 sec­onds per call) but only after launch­ing the app, and not after. Some­thing that I never noticed before ; nei­ther with other AIR apps, nor for this one before I added its heavy con­tent… And the tricky part is that it only occurred with a com­piled app, but not within ADL.

I googled a bit and found this thread which is mainly about the strongly­Bound para­me­ter for setItem, but its last post by Oliver Gold­man rang my bell:

The first time ELS is accessed the application’s sig­na­ture needs to be ver­i­fied, regard­less of whether or not strongly­Bound is set. If strongly­Bound is set, then the sig­na­ture is re-verified as the appli­ca­tion is run­ning. Either way, it’s expen­sive if you have a big application.

Small app: fast, fat app: slow as hell. Les­son learned…

And this is true both for Flash and HTML/JS AIR apps. So if you don’t need your data to be encrypted I highly rec­om­mend using Share­dOb­ject (or else) instead. As far as I’m con­cerned the first calls dropped from 5/10 sec­onds to a few milliseconds.

Bingo.

Weecast Player

Dur­ing the last cou­ple of months I’ve been work­ing on a free AIR app for a French community-based site called Weecast. Its pur­pose is to allow users to sub­mit and/or buy screen­casts about your favorite apps and lan­guages (mostly Adobe’s and Microsoft’s, but also 3D ones’, OS’s and more).

Intro­duc­ing the Weecast Player!

The app allows you to browse your videos, watch them (4 view modes), search for more, drop com­ments and stars… I think that’s called an RIA, right? There’s also an offline mode, so you can access all your stuff anytime.

All of this is made in Flex+AIR. The visual iden­tity was made by Weecast ; thanks for the PNGs, folks!

By the way, some parts of it are actu­ally Open­Source, includ­ing:

If you don’t know Weecast yet I highly rec­om­mend you go visit their site, grab an account and the player, enjoy free videos, and then buy some! Now if you don’t under­stand French… Well, learn it!

Kwot

A new project is online! It’s called Kwot, and it allows you to share and store your favorite quotes.

The UI is quite min­i­mal­is­tic, with focus on sim­plic­ity. Nav­i­gate through quotes with your mouse wheel, your keyboard’s left and right arrow or the mini time­line at the bot­tom. Add a quote by click­ing on the plus but­ton at the bot­tom right hand cor­ner. If you don’t pick any color they’ll be auto­mat­i­cally cho­sen via a magic algo­rithm! Another magic algo­rithm will rotate your quote in 3D space. But don’t worry you will pre­view that in real-time, ha!

I might add user (login) sup­port, lan­guage tag­ging, an RSS feed and stuff like that but don’t expect that too soon, hol­i­days are coming!

If you don’t have the Flash plu­gin or if you visit the site on an iPhone the site will look quite dif­fer­ent but every­thing will remain!

A few things I used in case you won­der: swfad­dress (you will love deep-linking!), GTween, FlashDe­velop, AMFPHP, the view­port width attribute… Oh, and by the way, the font face is called Neu­tra.

Add some quotes and drop feedback!

FFFFOUND AS3 API

I recently released FFFFOUND Desk­top, this AIR app uses a home-made API that I’m open sourc­ing today. The code is hosted on Google Code and is avail­able via SVN, I also uploaded a zip archive if you prefer.

You’ll find the (asdocs) docs in the repos­i­tory and in the archive.

By the way, I love feed­back. If you use it: please share!

Also, if you need exam­ples on how to use it, ask. I think the sources are self-explanatory but I might be wrong.

A few impor­tant things (also posted on the project’s page):

  • For now, this API will only work in AIR projects because ffffound.com’s crossdomain.xml is too restric­tive. I’ve con­tacted them but at this time they don’t want to change it.
  • The API relies on FFFFOUND’s RSS feeds but also on the site’s pages’ HTML, so some func­tion­al­i­ties might break at any time with­out warn­ing. Use with caution.

Watch the com­ments for any update or news!