Programing

Who blogs now days?

So it appears no one blogs any more? I know I haven’t.

Recently I have wanted to start writing up my thoughts the problem is I never know where to start or what to say. So for now this is me starting to write things down again.

Hopefully in the very near future I might have something useful to write again. Over the last year I have been working on some of the most amazing technology I have ever worked with oddly enough based on Microsoft C#. Its a nice language its a pity about window’s lack of a Terminal ๐Ÿ˜› but I do get to play with shiny new toys like the Kinectย and some rather amazing interactive applications.

Tags: , , ,

Tuesday, December 10th, 2013 Gesture, Programing Comments Off on Who blogs now days?

Optimizing J2mepolish Build Proccess

J2mepolish as a build framework is great! I have been using parts of it since before it was in beta.

J2mepolish provides different licenses depending on how you use the product now while this can be looked on in a bad light but I quite like the fact that it is open-source as well as long as you your self release the code under the same license should you wish to release under a different license there are other payed options available.

The build framework is licensed under GPL no matter how you use it.

I have found that the build proccess can be pretty slow and time consuming I have also found that with out obsfication it by default includes ALL classes in the framework include the GUI/Utils. While you don’t make use of them you aren’t violating the license it does increase the application size. There are a few tweeks that one can make to their own personal setup to improve this.

Firstly tmpfs and mounting your /build and /dist directory into memory (For debugging only I wouldn’t mount a full build) You would have to replace the standard build clean target since the standard user shouldn’t have permissions to delete/create tmpfs
Standard:

<delete dir=\"dist\" />

Changed

<delete includeemptydirs=\"true\">
<fileset dir=\"dist\" includes=\"**/*\" defaultexcludes=\"false\"/>
</delete>

Secondly the since the build proccess includes all the J2mepolish source files by default you should be able to just set polish.client.source to a empty directory but it contains a reference Locale which also contains references to other files(Which are not 100% needed unless you actually use the Utilities provided by J2mepolish)

So a simple fix is create a folder structure with /path/to/directory/de/enough/polish/util/Local.java and place this Local.java in there.

In the build file or one of the config files set

polish.client.source=/path/to/directory

and you should be all set. I noticed huge build time improvements but I don’t currently make sure of the GUI/Utils.

Hope this helps make you more productive. If you have any other tweaks I would love to hear them.

Tags: , , ,

Wednesday, August 19th, 2009 Mobile, Programing Comments Off on Optimizing J2mepolish Build Proccess

Using Python to Format Json

I have been working quite a bit with Json. Json disregards whitespace by implementation this makes the standard format of Json being a single very long line of not so readable text.
Simple example.
{"query":"some text","results":[{"title":"some result","id":"213"}]}
I had some plan to write some simple python script to format it nicely. I have used the json module before, I wasn’t aware it had a format function as part ofjson.tool.

curl + Json + Python
curl http://domain.com/api.json 2> /dev/null | python -mjson.tool

I found that with our redirection the error output to /dev/null i was getting.

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 67 0 67 0 0 76 0 –:–:– –:–:– –:–:– 0

Formated Json

{
    "query": "some text", 
    "results": [
        {
            "id": "213", 
            "title": "some result"
        }
    ]
}

Tags: , ,

Tuesday, July 14th, 2009 Programing Comments Off on Using Python to Format Json

Re Dumping currently loaded Firefox URLs

bryce posted his Perl version of Dumping currently loaded Firefox URLs.

I decided perl is unreadable ๐Ÿ™‚ and the file is json any way. So with the python-json package You can get some pretty readable code so I wrote a pretty simple Python version ff-pages.

Usage:
python ff-pages.py /path/to/location/sessionstore.js

I am starting off with python so all comments are welcome.

Update 02/06/2009:
python-json isn’t needed.
Seems to only work with firefox3.5

Tags: ,

Thursday, July 2nd, 2009 Programing 7 Comments

Sun Unreleases WTK3.0

I have heard alot about how amazing J2me development on their new WTK3.0 is.

The reason I say “have heard” is I refuse to use/try it until they release the Linux based version. I mean the product wont even run on their own Solaris OS way to go on marketing your own products.

The windows version has been out for more ages. I have logged a bug request on their site, I didn’t get a reply not that I was actually expecting to get one.

Under the Requirements section “Windows” are you kidding me, The guys that have been pushing and that revolutionized cross platform development.

For now at least my beliefs hold strong and I wont touch their shiny new toy until they release a Linux version. </EndRant>

Tags: , , ,

Monday, June 29th, 2009 Mobile, Programing 1 Comment