Archive

Archive for the ‘Hack’ Category

Query and Update Sparx EA Repository with SQL

January 25th, 2012 No comments

Sample Script to do it (using the Execute undocumented op)

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
option explicit
 
!INC Local Scripts.EAConstants-VBScript
!INC EAScriptLib.VBScript-Logging
 
'
' Script Name: SQL
' Author: Philippe Back
' Purpose: Demo SQL Invocation
' Date: 25/1/2011
'

Function SQLQuery(sql)
Dim sRes
LOGInfo("Query: " & sql)
sRes = Repository.SQLQuery(sql)
LOGInfo("Res: " & sRes)
End Function
 
Function SQLExec(sql)
Dim sRes
LOGInfo("Statement: " & sql)
sRes = Repository.Execute(sql)
LOGInfo("Res: " & sRes)
End Function
 
Sub Main
SQLQuery("SELECT * FROM T_OBJECT WHERE OBJECT_ID=1")
SQLExec("UPDATE T_OBJECT SET NAME='STUFF' WHERE OBJECT_ID=1")
End Sub
 
Main
Share
Categories: Hack, Improvement, Modeling, Tools Tags:

Upgrading to SSD on a Dell D430: What to Expect?

October 28th, 2011 No comments

I spend a good chunk of my day upgrading my Dell D430 to SSD.

What was the expected outcome that led me to do this?

Basically, I was fed up with the general slowness of the HDD, a 80GB 4800 RPM disk. Also, I suspect that since I have got this laptop for more than 4 years, the HDD would fail sooner or later and I didn’t wanted that to happen to me, even if I do take backups regularly.

The key factor was to be able to get rid of those pauses when looking deep inside my start menu program, speed up my Find and Run Robot (FARR) launcher, and all application launches.

Just swapping the HDD for the SDD and be done with that.

Not so fast!

Indeed, not so fast. It all went okay at the end but it took longer than expected and there were several bumps on the road, namely:

  • The SDD wasn’t recognized when I hooked it up to the system with the USB connector: this one was easily fixed, I hadn’t pushed the ZIF cable far enough into the disk. But this was easy to fix.
  • I used the Acronis disk clone feature to get the HDD cloned to the SDD. Looks like easy enough to do it but… nothing was cloned at the end of the process. I had to redo the moves and then, bam, magic! And it took a hell of a lot of time to clone everything.
  • The HDD inside the machine was enclosed into a rubberized enclosure to protect it from shocks. I had to remove the enclosure of the HDD to disconnect it from the ZIF connector. Then the SDD wasn’t fitting the space. So, SDD back into the rubberized enclosure and quite a while to get the whole thing to fit tightly into the space available. So, time to boot.

Getting to boot

Booting the system was easy. Everything turned out working fine. But some things took longer than I tought. So, the SSD is no magic. The whole system feels a lot fasters. And is. But web browsing give me some hiccups. Pauses. I found a great utility to help, named Flashfire. This solved some issues.

I am running XP SP3. This wasn’t too great for SSD disks. So, I had to disable prefetching, boot time optimization and other funny registry settings. Well, this is done now and brought several good things with it. I got to know the fsutil command for disabling features of NTFS.

Now, pauses are gone. I saw that Windows 7 would be better to SSDs. But not much more than what I do have now. HDTune gives me the speced speed. Which is around 90MB/sec. Which isn’t what SSD should give on SATA machines, but this is a PATA UDMA Mode 5 chipset here and there is no way it is going any faster.

I have rebooted quite a number of times to get everything in good shape and the battery wasn’t drained as it was usual with the HDD. So, a good point here.

How does it feels now?

Well, pretty good actually. This SSD isn’t delivering its full performance, being somewhat limited by the chipset of the Dell D430 but there are really great benefits that were worth the upgrade.

Here is my list:

  • no more HDD noise: a great feeling, no more grinning of platters
  • more space since this is a 128GB SSD and I was moving off a 80GB HDD
  • much much snappier menus

I declare this to be a success. It is extending the life span of this little solid machine (even if it is not a superspeedy and superpowerful box, I can in fact achieve a lot with it. And that because the keyboard is very well built and has a decent size without a numeric pad shifting my typing to the left. And a 12” form factor is just what I need when moving around. It is just a bit larger than my iPad2.

Any special things to mention?

Yep, sure. First of all, my Nusphere’s PHPEd editor is starting amazingly fast now.

As a contrast, Sparx System’s Enterprise Architect is only marginally faster. Go figure.

So, an SSD isn’t going to cut all times in 10 on this box. But the advantages are good enough to justify my investment in the RunCore SSD 128GB 1.8” ZIF PATA. Which was about $219. You can almost get a new laptop for that price but not as sturdy as this little Dell Latitude D430.

Share
Categories: Hack, IT Tags: ,

#fosdem followup on Arduino and Squeak eToys

February 7th, 2011 1 comment

Check out how fun this could be (no compile time, only fun, runtime)

Controlling Arduino with Squeak
http://tecnodacta.com.ar/gira/Arduino.3.rar

And Kinect comes to the mix from the same great people (note that the little red car is driven through Kinect)

Pay them a visit at:

http://tecnodacta.com.ar/gira

Cool isn’t it?

Share

Arduino kit from #fosdem 2011: get the electronics back

February 7th, 2011 No comments

Yesterday, I got myself an Arduino experimenters kit. As a side note, the kits sold at FOSDEM come from Italy and support decent working conditions, something that is quite nice. I hope to have contributed a bit.
The kit is of good quality and there is all one may need to get started. What I do have in mind is to use the Arduino and the electronics to work on bridging a Microsoft Kinect device with Squeak Smalltalk and the Arduino. Software support exists for both of them in Squeak and it would be great to have fun activating my Lego Mindstorms through gesturing in front of a Kinect and controlling the little Lego blocks.

This is going to bring several of my ‘past lifes’ together. In fact I have the full electronics kit (including soldering iron, drill, components, and what not) that I haven’t been using for some time. Last time, I was making ISA cards for building 286-based oscilloscopes and AD/DA based boards. This means a loooong time. Anyway, ICs do not die,  they just lay there, waiting for new projects.

And now, as I have a brand new office with lots of space, I can devote a table for Arduino projects. Stay tuned, as I’ll have a number of posts describing how things are going.

Here are some pictures:

Kit Contents

The Arduino Uno board

Share
Categories: Gadgets, Hack, IT, Open Source, Widgetry Tags:

Webkit talk at #fosdem

February 6th, 2011 No comments

Interestingly, the presentation makes use of WebKit instead of Powerpoint, Impress, or whatever presentation desktop software.

The talk’s going to be about “Discovering the WebKit world”.

Hard to understand what the guy says… A bit stressed out.(update: like a diesel, he turned off to be quite fine, but has to learn how to be less stressed and more confident – hey, dude, gimme a call).

Key point: we do a web engine. All right, now, … so what?

A bit of history

KHTML is what started it all in 1998-1999 but the project took off with Apple taking care and relased Safari based on WebKit.

Apple opened WebKit in 2005. Then we see ports to Qt and GTK, followed up by a port to Chromium in 2008.

Now, you can consider that WebKit is now truly open.

What kind of apps are using WebKit?

Safari, Chromium, Google Earth, iTunes, AppStore, Spotify, Netflix, Adobe Air, Steam / Valve.

But these guys aren’t so cool since they do not contribute a lot back. But http://www.webkit.org is more friendly.

Showcase time

(note: next time, ready your code editor, it sucks waiting like that…)

Let’s have a Qt demo.


view.load(QUrl("http://www.webkit.org");
viw.show();
app.run();

Tada! A web page rendered!

That’s so easy that there a lot of so-called browsers popping up all over the place. But it is not so easy to do a good browser. So, tons of crap…

Next, a HTML5 Canvas-based app showing off how WebKit rulez.

Indeed, it does. Lovely. I wonder how I can embed WebKit in Squeak. Should be easy. I’ll ask after the talk so that I can have fun with a Squeak plugin.

WebKit supports CSS animations and transitions

Instead of messing with timers and Javascript headaches, let’s go transitions!

A litte inspector opens on the slides, and tada, a bit of CSS3 transform on the elements to align on the right.

wekbit-transitions: -webkit-transform: 3s

Ah ah, good! A much welcome thing to basic animations. A ton of crappyscript just got thrown into the garbage can.

Bonus with CSS: speed, seamless integration, removal of silly transiiton code from useful app-centric code.

Offline access with WebKit: yet another complaint about HTML apps goes out of the window

  1. WebStorage
  2. IndexDB
  3. Application cache: just mark some resources as available on line, and there they are
  4. (Web SQL): deemed to be a mistake

On webstorage: a object local storage (key, object) pairs. Supereasy and cool storage thing.

Hybrid applications: mix C++ and HTML: Yikes!

Spotify and Netflix do just that.

That’s power meets easy UI.

Interesting concept, but one that opens a lot of headaches when it comes to portability IMHO. Well, people use it, so there is a market..

(some pictures to come, but I am now in the room, this will be for later.)

The key takeaway is that you can use the C++ controller from the JavaScript context, and back. So, in an application, it is great. In fact, I do love that.

This would bring together my C++ skills together with my web skills. Woot!

+ animations

And there you get a CoolIris lookalike. So, no OpenGL, no shaders, … All with basic HTML and transoformations. All that letting you use the inspector to make changes here and there on the UI: One word: COOL. AWESOME also comes to mind.

And there is a WeKit is the people part

WebKit vision: in brief: Hackability meets standards.

Platform layer+V8 Javascript engine+WebCore+WebKit(2-research)+upper layers for showing off on the user screen.

Infrastructure

http://webkit.org : main website

http://build.webkit.org – The QA Buildbot space

http://wiki.webkit.org – Where to go for details

On #IRC: #webkit channel

There are also blogs and bugtrackers.

Conclusion

WebKit has a lot of power and is easy to embed. This opens a lot of new roads to travel and enjoy creating great applications for users.

The talk wasn’t digging on the details but provided me with a great overview of what was possible with WebKit.

Horizon

WebKit2 is still research but we are going to get multiprocess.

The point is to beat Chrome. Let’s see what it gives.

Thanks for reading chaps!

(update – pictures)

Share
Categories: Fosdem, Hack, IT Tags:

La spiruline, l’alliée de votre forme

January 23rd, 2011 No comments

Kezako?

La spiruline est une algue couleur bleu vert qui possède des vertus fort intéressantes.

En tous cas, il n’y a pas photo entre les jours où j’en prends et les autres. Au vu de mon agenda de suractif, il faut parfois mettre un tigre dans le moteur.

Pour cela, vive la spiruline! Au contraire du café, du guarana, du RedBull, Monster, Nalu et autres PowerShots elle vous soutient au lieu de vous “niquer” les surrénales qui un jour vont vous lâcher.

B9, B12, fer, phosphore, calcium, magnésium, zinc, cuivre, acide linoléique: de la bombe! Et sans le pic d’insuline lié aux sucres.

Comment prendre ce truc?

Ca dépend de la présentation. En poudre comme à gauche sur la photo, je n’aime pas. En grains comme la version de droite c’est super sur la salade, vite fait dans un verre d’eau. Et le matin.

Autre booster: l’aswaganda. Nom barbare mais également fort bien. On en parle une prochaine fois.

Essayez donc et donnez moi des nouvelles!

Share
Categories: Hack, Healing, Improvement Tags: