Java FX: Where the dickens have you been?

Posted: July 31st, 2008 | Author: remote | Filed under: web dev | No Comments »

crazy rotating windowSo, looks like JavaFX is finally arriving.

It was first announced at JavaOne in 2007 (yes, seven) and it now looks they are ready to let it fly.

The JavaFX part of the Sun site has been somewhat barren for ages but it has been updated with some previews and stuff.

I was thinking that it might be a case of too little too late for JavaFX but now I’ve looked at their updated site and checked out the previews I’m not so sure.

The previews look nice. Not any better than Flex or Silverlight or Dojo or whatever but still very nice. It can certainly compete in terms of looks.

Integration with NetBeans will be a winner. NB is a powerful IDE and it’s gaining features all the time - there’s a preview release of NB with integrated JavaFX SDK. Not related, but NB is getting Python support soon too.

My “meh” reaction to JavaFX has suddenly turned into foaming-at-the-mouth-moist-in-the-pants anticipation.

The JavaFX scripting examples look simple enough - shouldn’t be any great shakes for existing Java devs.

Not sure what’s available for networking - presumably it’ll do web services, xml, json, etc, etc out of the box. How long do you give it before someone has created and RSS reader? Two days? Three?


ScribeFire: Firefox add-on blogging client

Posted: July 30th, 2008 | Author: remote | Filed under: blogging | No Comments »

The quest for a blogging client continues and the next option on the block is Scribefire.

It’s a bit different to the two I’ve tried already, BloGTK and BlogDesk, in that it’s a Firefox plugin. I like to use my browser as a browser and I don’t particularly like plug-ins that try to extend a browser to do something it wasn’t designed to do. But we’ll see.

Installation was a breeze.

  • Went to Scribefire site. Installed plugin and restarted FF.
  • Scribefire setup wizard was excellent. I put in my blog’s URL and it came back and told me that it’s a Wordpress blog and offered some default options. Next I just put in my user/pass and that’s that. That’s how a setup should be - nice and easy.
  • Get taken to a welcome page and then I hit F8 to bring up Scribefire’s window. And I’m writing this after about 2 mins setup tine.

Editor is nice. Has all the expected options plus a few nice extras.

There’s a quote button.

There’s buttons to increase and decrease font size. That’s useful - save’s having to remeber which header tag you are supposed to be using.


The insert image is OK. It lets you specify a local file or a URL. There’s an option to upload the local file using FTP or the WP XML-RPC API.

No option scale or modify the image though - that’d be nice. At the very least a “small, medium, normal or large” selector would do.

There’s a source view too, which is handy to tidy up any loose HTML created by the WYSIWYG.

Wow, just noticed the Preview pane. This rocks. It picks up my blogs theme and shows the preview using that - extremely cool.

The really nice menu options I mentioned earlier are buttons to let you drop in video or image from YouTube and Flickr respectively.

Where’s Scribefire saving my post to before I publish it?


BloGTK: Desktop blogging client

Posted: July 30th, 2008 | Author: steve | Filed under: blogging | No Comments »

I really liked BlogDesk - really liked it. Used it at lunchtime to write a couple of posts using my XP box at work. Was about to set it up here at home when I realised that it’s for Windows only. Bummer.

I need to find a desktop blogging app for Linux. BloGTK seems to be popular and I’m writing this with it. It’s definitely not in the same class as BlogDesk.

First of all, I went to set up a new connection. There was no Wordpress option. WTF? There was an option for a Metablog API and so I picked that - not a good start.

The editor is not so good either. The link I pasted in above appears in the editor as raw HTML - it doesn’t look like there’s a WYSIWYG editor. There is a Preview Pane that shows you what your post should like when published but it’s view only.

<blockquote>There’s an option on the editor menu to create a blockquote. Again, the raw blockquote markup is shown in the editor. Also, the blockquotes don’t look correct in the Preview Post editor pane.</blockquote>

Spell checker works OK.

I went to add an image to this post but the Insert An Image dialog is not a patch on BlogDesk’s. There’s no way to browse my local disk to pick up an image. There’s a positioning option but not styling and there’s no easy sizing options.

Eh, so, I never actually managed to post this with BloGTK - had to go to WP and post it from there. Seems that my account wasn’t set up properly as I couldn’t publish. No errors, no warnings, no hints - I don’t know what’s wrong with it and it’s not telling me.

As you can see above, the blockquote didn’t work either.

Think I’ll give Bleezer a go. Either that or I’m gonna have to boot XP at home, which I’m reluctant to do.


Using Backslash to Continue Python Statements

Posted: July 30th, 2008 | Author: remote | Filed under: Python | No Comments »

Since Python treats a newline as a statement terminator, and since statements are often more then is comfortable to put in one line, many people do:

if foo.bar()['first'][0] == baz.quux(1, 2)[5:9] and \
calculate_number(10, 20) != forbulate(500, 360):
pass

You should realize that this is dangerous: a stray space after the \ would make this line wrong, and stray spaces are notoriously hard to see in editors. In this case, at least it would be a syntax error, but if the code was:

value = foo.bar()['first'][0]*baz.quux(1, 2)[5:9] \
+ calculate_number(10, 20)*forbulate(500, 360)

then it would just be subtly wrong.

It is usually much better to use the implicit continuation inside parenthesis:

This version is bulletproof:

value = (foo.bar()['first'][0]*baz.quux(1, 2)[5:9]
+ calculate_number(10, 20)*forbulate(500, 360))


Blogdesk: the blogging desktop client

Posted: July 30th, 2008 | Author: remote | Filed under: blogging | 1 Comment »

This post is written using Blogdesk. It’s a desktop application that lets you write blog post and then publish them without having to visit your blog through a browser.

It took roughly 5 minutes to setup, I:

  • Created a new blog user with Author rights but not Admin (I’m paranoid)
  • Installed BlogDesk
  • Went through the “New Blog” wizard. This set the blog user to post with, downloaded the categories and checked that images could be uploaded.
  • Wrote this post.

The Blogdesk GUI is nicely laid out, you can start the app up and get straight into writing a post without having to select any menus or other needles UI interactions.

The editor has all the features you expect:

  • Change fonts and styles
  • Change colours
  • Insert lists
  • Add links
  • Spell checker
  • Insert graphics.

nelson

The “insert graphic” option is great. It lets add styles such as the shadow on the left, position the graphic and also resize it. Very nice.

 

 

The F5 button switches the GUI editor between WYSIWYG and HTML modes so you can tweak your markup if you need to.

This is my first post using BlogDesk but it seems like a quick and easy way to blog - much quicker than using Wordpress’ own method. The image insertion functions make BlogDesk worth using on their own.


Wordpress presentation layer is a mess

Posted: July 26th, 2008 | Author: steve | Filed under: Wordpress, web dev | No Comments »

As much as I love Wordpress, and that’s a lot, I can’t bring myself to accept the state of the presentation layer.

Have a look at a Wordpress template’s index.php - it’s usually a big plate of code soup. It’s a mess, it’s difficult to read and a pain to debug. It gets particularly bad when you start to modify a standard template to introduce some site-specific behaviour - you invariably start adding if statements and case statements that bloat the PHP and lead to an even messier soup of HTML and PHP.

Why doesn’t Wordpress come with a templating engine by default?

There’s plenty about. I think there’s also a few WP plugins for the Smarty template engine doing the rounds already.

Adding something like Smarty into Wordpress would:

  • Let template designers concentrate on what they do best: design beautiful templates. They wouldn’t need to know anything about the WP PHP code other than to look at the template tags they need to include.
  • Make templates version independent. At the moment many templates break when a new version of WP comes out because the WP API has changed, been deprecated, had a bug fix, whatever. Templates would do away with that - assuming the tags never changes and it’s unlikely they would need to.
  • De-soupify the HTML.
  • Give WP a proper presentation layer!

Need a GUI for Linux’s history command

Posted: July 26th, 2008 | Author: steve | Filed under: linux | No Comments »

The Linux shell’s history command is very useful. Typing ‘history’ will list you the last X commands you entered in that shell. Typing CTRL+R will pop up a prompt and allow you to search for a command by typing a section of it.

For example: Hit CTRL+R and then type ’svn’ will list the last svn command you entered. If you have more than one svn command in your history you can cycle through them by typing CTRL+R again until you get to the one you want.

The history and the CTRL+R selector are great; really useful when you need to re-run long-winded command lines. But, I think a GUI version would me way better. The CTRL+R doesn’t always work properly and sometime you can’t find a string in the history even though you know it’s there. It’s possible to accidentally run the wrong command because CTRL+R will always leave you with something from your history at your command prompt and it won’t always be what you wanted. Hastily hitting return on a command you didn’t want could be disastrous.

If you had a small GUI for history you could control your list much easier using the mouse. It’d still let you search for command using a regex input but there’d be no danger of accidentally running it at the command prompt; you’d have to paste it in first. The GUI version could also let you store your favourites so you can quickly re-run command commands. Favourites is probably not the right word to use, you’d have to be a serious geek to have a favourite command line, maybe something like Starred or Saved would be less romantic and geeky.

Maybe this GUI version already exists - searching for “linux history GUI” just throws up a load of links to pages talking about Linux’s progress etc.


Gnome keyboard shortcuts

Posted: July 20th, 2008 | Author: steve | Filed under: linux, ubuntu | No Comments »

General Shortcut Keys

Alt + F1 Opens the Applicantions Menu .

Window Shortcut Keys

Alt + Tab Switches between windows. When you use these shortcut keys, a list of windows that you can select is displayed. Release the keys to select a window.

Panel Shortcut Keys

Ctrl + Alt + Tab Switches the focus between the panels and the desktop. When you use these shortcut keys, a list of items that you can select is displayed. Release the keys to select an item.

Application Shortcut Keys

Shortcut Keys Command
Ctrl + Z Undo
Ctrl + S Save
Ctrl + Q Quit

Find your niche

Posted: July 19th, 2008 | Author: steve | Filed under: making money on the web | No Comments »

If you were thinking of opening a shop, you probably wouldn’t open a burger bar next to McDonalds and try to compete - would you? A back-street restaurant away from the big boys that serves a niche could work - your niche could be local students, office workers or vegetarians.

The Internet is the same as the high-street. There a lot of big players and big brands and you aren’t going to be competing with them anytime soon. An online music shop? I think Play, HMV, Amazon and the rest have that covered. But what about a CD shop for the Bangra niche - maybe that’s not being served by the big boys. It’s going to be a smaller market but a small market can be a lucrative one.


Stop worrying

Posted: July 19th, 2008 | Author: steve | Filed under: making money on the web | No Comments »

Stop worrying about the things you can’t do.

Stop worrying about whether your new site, product or idea will work.

Stop worrying if someone else is doing it better.

Stop worrying if you are good enough.

Stop worrying about whether people will like it.

==================================

Focus on what you can do.

If you have faith in your product you will make it work.

It’s a big internet, find your niche, eastablish yourself and then DO IT BETTER than the rest.

Everyone has doubts but few overcome them.

Find your niche and they will come.