Dec 8, 2007

one feature per day is a lot

Yep, I should have posted something before before yesterday
and same before yesterday, etc.
and same for yesterday etc.
and I didn't, does that mean the procrastrination kicked back ?

nope

Let's be realistic guys, during the week, I got about 2h per day to work on personnal projects, and to implement features (and I mean real features), humm it's just not enougth time for what I got in mind.

So ok, if you allow me, I'll change the rules a little bit, let's make it a big real feature every week, and if during the week I can add more, well let's consider that as bonuses.

Right now, nothing more to show yet (emphasis on the yet ;)), but during that week I thought a lot and yes worked a lot on the console app itself, ok not features per se, but more how it should reacts and works.

So I've been mostly Working on the UI, but on the graphic and design side, not delved too much on the API.

Ok, I failed posting a tag release for december 4th/5th/6th/7th/etc., but the good news is that now I cleared a lot of the ideas I got to navigate the UI.

Remember, I said that tabs suck (for a console, not necessary for other type of applications), and I persist to say it :p, but then how to design an UI to be able to switch console context without tabs ?

well.. you ARE inside a console indeed, so you should be able to write commands to do that, something as

shell>switch othershell
othershell>other command here
yes, I'm thinking of a console having different display context depending on what you want to log/watch/track/etc.
and yes the prompt should show you in which context you are.

But wait it's not only that, if you read me well I said that I was inspired by the OS X finder preview UI, but other things in OS X do inspire me, and for example how you edit the settings of widgets, on one side you got the application interface, you click on the config button, got a flip effect, and then on the other side you can edit your settings.

Please, bare with me a little, I'll come to the point.

I also said that I was not a fan of the info/verbose/warning/etc. paradigm, and this still stands.


Now let's put all these concepts together;
You got a console with a main shell where you can execute commands, this main shell can flip to a main setting where you define tags.
shell>config [enter]
[flip effect, switching from a command line context to a setting panel]
A tag, allow to assign a color and a name for a a log, for exemple: green for info and red for error.
The setting panel allow to change the color per name, and to filter what tags are displayed in the console or not; basic switch on/off.

Within the console1 API, you should be able to dynamically add (but not remove) tags, so imagine you want to log the IN and OUT of some FTP clients you're working on, you could define something as
console1.defineTag( "ftpin", colors.blue );
console1.defineTag( "ftpout", colors.pink );
and when the console1 UI kick in, those tags would be present, after you can decide to switch them off if you don't want to see them, either going into the setting panel of the console, or by adding some code maybe something like
console1.switchOff( "ftpin", "ftpout" );
Why doing like that ?
just for the reason that you need more and less than just 5 type of logs imho, and during logging/debugging sessions maybe you just want to see in your logs the "errors" and the "ftpin", and 10mn after just the "ftpout" and the "info".

So, my main problem with that concept is that I wanted to have a flip effect that, one, can be somehow easyly implemented, and two, does not need any 3D library dependencies, thanks to some cool guys who researched a lot on the subject of displacement map filters within flash I will nail this weekend a small class that can allow to do just that.
So here the credits, kudos to you guys: psyark thanks mate I don't read japanese but I do read code :), Alan Shaw for psyark tutorial translation, Paul Ortchanian of reflektions for his numerous examples and the Flash Forward 2007 (Boston) lecture notes, also to Emanuele Feronato who happened to post on this very same subject when I looked for more infos.

For other credits, well the tags idea come from gmail directly, I'll keep it simple for now, but it could happen that you also be able to define more than one tag per log, I need to think more about it.


Now, let's investigate more about those different shells you could have in console1.
I will provide at the beginning, one main shell with basic commands (no, I don't plan to emulate bash or other well known shell), and later I will provide more shells, and a way to add your own shell as a plugin.

Ideally, the main shell will provide a default tag for the logs, and depending on your needs, you will be able to define a global tag or define a local tag.

A global tag would be something as a "XML" tag, so wether you are in your "WSDL" shell or in the main shell and you just want to dump the content of some XML instances, the tag will be applied globally.
A local tag would be a tag that will be activated only if you're inside a particular shell, for exemple if you have a "ftpdebug" shell, the tags "ftpin" and "ftpout" would be active only within this shell.

Note that this kind of API will not appear in the next days, but let's say it's the end of the month goal to obtain such architecture.
And if I plan it like that it's because just for my needs I need those different shells, I need a shell to run some unit tests from the ASTUce project, I also need another shell for the edenRR project, and last but not least also a shell for a AIR FTP client I plan to start later.
So basically if I need those kind of different shells, you may need them too for your own projects :).

And all that bring me to the end of this already too long post.
One thing that is lacking a lot in the flash world is the concept of the CLI (Command Line Interface).
Ok, agreed, Flash can allow you to build great UI, but as a coder a CLI do have a lot to offers.
We can borrow a lot of the concepts you can find in different CLI and apply or adapt them to flash, and I'll try to demonstrate that with console1 :).

If all go well I should be able to show something next monday.


read more ...

Dec 4, 2007

start me up

When starting to write an application, there is always the never ending dilema of starting with the GUI or starting with the code, even if the two are related you need to start somewhere.

But wait, what you really need first is a minimum of specifications, describing in few words what the application is supposed to do, so let's start here.

Console1 is a logger tool, something to do live trace of executing code to help a coder track certain parts of the code, manipulate it and more.
But it's not only that, as the name tell us, it's a console, it allows text entry to interface with a shell, so in that purpose console1 is a mix of different concepts as a virtual console, a system console, a command line interface, a PC game console, etc.

You can find the code repository for console1 here, and each day you will find a tag release named "challengeNN" (NN being the day of december) implementing a new feature.

challenge03

so the first feature, well it's gonna be mostly the GUI and a little bit of UI related code.
The GUI need to be done in a kinda special way as it need to work with both Flex MXML (as a component) and AS3 only (no component), even if I have opted for a very simple UI (mostly inspired by the finder preview in Leopard), the UI need to be dynamically created so in that purpose we gonna draw programmatically the user interface.
For now we gonna keep it simple, rounded corners, a textfield, and a bottom area to display options.

The reason to start with the GUI part it's because I got a very precise idea of how the GUI should react, I want a GUI that can switch from a window to fullscreen (implemented actually, just click the window), and in fact I plan other type of switch-thingy, well wait few days to see those features ;).

So ok, nothing impressive so far, but hey it's a v0.1 and mostly a prototype, for more details check the wiki log.


read more ...

Dec 3, 2007

challenging myself

Humm I feel it, procrastination time is over (proof I even write blog entries again), so now that I got that big desk and a lot of spaces for all the laptops and screens, time to put all that to good use.

One pet project that I always hacked around, let die, then rebuild from scratch is a logger tool, a very simple text console that can do live trace on some executing code.

Oouh no biggie you may say, I guess everyone have wrote a quick one at one time or another, but wait now I'm talking about a real usefull tool, something you wrote as a product not as a quick 10mn hack.

So I give you console1, well only the concept for now, but the experiment in itself could be interesting (heh at least for me).

And no, I'm not reinventing the wheel, sure you got great logger out there, for flash (xray, alcon, luminicbox,...), for Javascript (firebug), etc. but hey they just don't do what I need, what I want, and believe me I want a hell lot more of what they offers :).

First, I just don't like the classic info/debug/verbose/error/warning classification of the logs, yeah ok it could be usefull but honestly do you really have a project that use all those different variation of logs type ? humm for you I don't know but me not, agreed color information in the logs are usefull, but classifying logs as 5 different types is sometimes too few or too much, well it just don't adapt enougth for me.

Second, GUI and tabs, well let me tell you that it's not the panacea to manipulate logs with tabs, in short I think it sucks and something better can be done, logs are mostly text and the GUI should focus on text manipulation, you should be able to have an option that set XML rendering to green or syntax highlight, and in the flow of logs if some XML appears then apply the color settings, things like that.

But well, there's not really much I can show by just talking about it, doing and explaining why I do it like that, for what purpose, should be much much better, and that's why I'm challenging myself.

Inspired by iApp-a-Day in which Sean published a iPhone app everyday for a full month, and to kick that procrastination real good I decided I gonna add a feature to console1 every day, and if I don't you can publicly kick me :p (that should be pressure enougth to get me going).


read more ...