Se apropie iunie .. oare iese iPhone?

Eh, de abea incepusera sa se linisteasca apele. Doar ca a durat atat de mult sa se calmeze multimea de fan-boys, entuziasti si critici incat s-a apropiat lansarea. Da, vorbesc de iPhone, noul telefon “revolutionar” de la Apple Inc (fara Computer in nume). E adevarat ca are o tona de features interesante, multe features lipsa, dar nu este chiar cel mai bun motiv de hype.

Cand Steve Jobs l-a anuntat la MacWorld a mentionat si ca va fi disponibil din vara in reteaua Cingular. Dar n-a zis cand. Putin dupa aceea s-a confirmat ca ar fi prin iunie. Si cum ne apropiem destul de iunie incat luna sa nu mai fie chiar relevanta, lumea vrea o data precisa. Si bineinteles ca a “leaked out”, sau cel putin se speculeaza la greu: 11 iunie. Motivele? Doar 2:

  1. Se zvoneste ca aceasta data a fost confirmata de personalul de suport de la Cingular, la echivalentul lor pentru *222
  2. 11 iunie e prima zi din WWDC, deci ar fi o mutare logica – cu ce mai bun sa impulsionezi o conferinta decat cu vanzari promotionale ale telefonului de-abea lansat?

Cat despre mine … eu mai intai l-as incercadaca ar fi disponibil in romania si unlocked. Apoi as evalua daca lipsa suportului pentru aplicatii 3rd party combinat cu pretul destul de piperat al mobile web-ului in romania justifica un cost la fel de piperat pentru un telefon.

Dar trebuie sa recunosc, it looks darn sexy.

Advertisement

Fara prelungitor?

Se pare ca o firma din Pennsylvania a ascultat rugaciunile tuturor celor care s-au saturat de prelugitoare si power cords. Conceptul de a transmite energia catre un device wireless exista de ceva vreme, doar ca implementarea s-a dovedit destul de anevoioasa.

Eh si acum baietii astia care au strans deja ~10mil USD din venture capital promit sa produca “may million of units” pana la sfarsitul lui 2008. Partea cea mai buna – din declaratiile initiale se pare ca ar costa ~5$ per unit. La pretul asta vreau si eu pentru toata casa, sa scap de firele de sub covor 🙂

Via engadget.

MaxPayne invie?

Nu-mi place sa scriu “primul post”, mai ales ca nu e nici macar primul blog, asa ca, cum ar spune americanii, “let’s get down on the floor”.

Via ArsTehnica, cei care au contribuit major la crearea jocului MaxPayne si-au deschis o noua firma de jocuri, de unde spera sa ne prinda iar in fata PC-urilor. Sa speram ca vor face o treaba la fel de buna ca si cu Max Payne 1 (the sequel nu a fost atat de bun).

Firma se numeste “Recoil Games” si din ce promit ei vor lansa jocuri pentru PC, Xbox 360 si PlayStation 3.

Sa vedem ceva curand, la fel de tare ca si MaxPayne.

Checking code coverage

Well, only writing unit tests is not enough – you still need to know how muchof the code your tests test. This is why a code coverage tool is great.

Clover is one of the tols used to compute code coverage and is now updating to a 2.0. The beta is on the site and it seems to add some interesting features:

  • dril down in the test suite to see what statements each code provides
  • Per-method coverage statistics
  • Complexity statistics
  • Simplified Ant Tasks
  • Integrated historical reporting
  • Aggregate package statistics
  • Configurable report columns, column formats and column thresholds
  • Improved runtime coverage recording performance
  • New runtime configuration options to control coverage recording

Flex Module for Apache and IIS is out the door ..

And into labs. Last night Adobe launched on Labs another tool to help developers create Flex Applications free and easy, an the Operating System of choice. I’ve talked before how you can create Flex Applications using only Vim (or any other text editor for that matter), the free Flex 2 SDK and the command line. Now I can strip the command line off that list. No more write > shell > compile > copy > preview in browser once this baby is installed.

So what does it do?

It installs snugly next to your free copy of the SDK (or brings its own one with it if you need it) and plugs itself into Apache (my choice) or IIS. Then all you have to do is point your browser to a mxml file (like http://localhost/flex_app/index.mxml 🙂 ) and it will do all the heavy lifting. You’ll get a swf wrapped by some basic html.

So, if you think it may be interesting for you, grab your copy here (free as in beer of course).

So if you were wondering why I had to poke around Apache modules, now you know 😉

How do you create a new Apache module?

Maybe this exists well documented somewhere – I couldn’t find it. This last month I had to do some work which involved creating an Apache module from scratch. For Linux and MacOSX creating a module is pretty easy – Apache even lends a hand via the APXS tools. On windows there’s a totally different problem. This is why I will try to write here how to create a module.

Hypothesis: We want an Apache 2.x module written in C++ which will respond to certain requests – let’s say .doc files – with a standard text. This is a very easy scenario, but one on which we can build later on.

Part 1 – creating the module on Linux/MacOSX:

This is the easy part. It only takes a few steps to get it done:

  1. Make sure you have the apache2 and apache2-dev packages installed. On Ubuntu/Debian you can find these packages in the Synaptic Package Manager. On Red Hat / Fedora Core systems you can find rpm’s online. On MacOSX simply install the developer tools.
  2. Check that you have apxs available. Try typing apxs in a terminal. If the required packages are installed you should get a help page.
  3. Let’s create the module files. Go to a folder – e.g. /home/my_user and create the enclosing module dir:
    $> mkdir modules
  4. Now apxs/apxs2 already comes into play. One of the flags (-g) can generate a default module template. Let’s do this now. Switch folder with the newly created one and call apxs:
    $> cd modules
    $> apxs2 -g -n doc
    or $>apxs -g -n doc
  5. The -n argument sets the newly generated module name, In this case it is mod_doc. The -g tells apxs to create a new template module.
  6. The default template generates code for a module that implements a custom request handler – just what we need. We could already test the created module and we would get an answer, but it’s not needed right now – it will just print out The sample page from mod_doc. Instead let’s modify the response. Find the line with the above text and change it into whatever you want – let’s say: You are not allowed to download docs! . Save the file and close it.
  7. Almost there now: we need to turn the .c into an Apache loadable .so. Open a terminal in the modules/doc folder and type:
    sudo apxs2 -c -i mod_doc.c
  8. You must use sudo in order for the apxs tool to be able to copy the compiled .so into Apache’s modules folder. If you don’t get an error it’s one step to the finish.
  9. Let’s tell Apache what to use to handle .doc files. Open httpd.conf (location varies depending on your distro) and add these lines at the end:
    LoadModule doc_module modules/mod_doc.so
    AddHandler doc .doc
  10. Now restart Apache and request a doc file through the browser. Instead of a download prompt you will get the HTML text added above.

In the next post, Part 2 – modules on Windows with Visual C++ 2005 Express Edition.

Updating WordPress

I guess everyone knows by now about what happened with WordPress release 2.1.1.  It seems that a hacker managed to get an account on one of the download servers and tampered with some of the releases. He added some exploitable code that allows remote control of the blog (e.g. this usually means the possibility to delete all content). Then someone found this piece of code buried inside one release package and notified WordPress. They put up a new minor release fixing this exploit and some other bugs and are trying to find out who did it.

That’s pretty much the summary of what happened, and it is only to remind us of how important security is in the world of software. Even blogging software. So, if you’re using WordPress 2.1.1 you should update. You may not be affected, but why risk it?