Jul 25 2011

Change of tack

Published by under geekery

I have decided to go for putting all notes in the new app into a database format. While I love the idea of working directly from the file system, I have a suite of reusable classes that I can use to create nice URLs and route them to show notes from a database query. I have now set this up and got a couple of test notes in place and working. Part of the rewrite plan is that I will be able to set up a RESTful interface to the database and then wire that into a PyGTK interface for a desktop client as well. Small steps though… Next steps are to write a set of routines to take a folder of text files and import them to the database. 

No responses yet

Jul 24 2011

First steps on the new app

Published by under geekery

Had a good 3 or 4 hours on the new app last night and have now got it set up so that I can log in and out, can read a folder of text files and show the nested hierarchy, and click on filenames to load them in to view. I’ve opted to use the filesystem to store the files, but it feels a little clunky now that I’ve set it up so I may refactor to use a database and a prettier URL scheme. As long as I have an import/export function from the start that should work.

Most of my files are in Markdown format so I’ve used a Markdown PHP script to convert files for display. This gets round the need to have any kind of rich-text editing ands storing to implement basic formatting, which appeals to me.

Next steps:

- implement edit function to be able to edit the current file
- use JQuery to make the file structure hierarchy collapsable
- write an import function to take a folder of text files into the database
- write an export function to get them back out

No responses yet

Jul 23 2011

Printing problem resolved

Published by under geekery,work stuff

I have had a perennial issue with printing to work printers through my linux laptop. I have been printing to our work printer just fine for a couple of months, but a recent move to Ubuntu left me unable to connect again. I have had mixed results with this over the years, and the problem seems to affect some distros and not others – the problem is:

- open the ‘Printers’ config app
- use the ‘browse for SAMBA share’ option
- find the printer
- enter my credentials and click to verify them
- dialog comes up to say “This print share is not accessible”

Now, a search on Google turns up many, many results, most of which relate to getting a home Windows printer visible to Linux, and none of which will solve my particular problem. Linux Mint used to be great in that it would always connect even when Ubuntu or Debian wouldn’t, but even Mint failed this time. I resolved to fix this once and for all this week.

When I browse to the printer using the printer admin UI, I can see the printer, but the name it is populating into the name field is wrong. Say the share is called “my printer share” – the name that is brought over to the config window is “my20printer20share”. It’s trying to put a “%20″ in place of the space, but “%” is a disallowed character so it doesn’t come across. And “my20printer20share” is not validating as it is the wrong name. Root of the problem found, but no way to fix as I can’t enter the space characters using the printer admin tool.

The solution is to use the CUPS web interface. Here are the steps I took to get things working:

- Work through the process of adding a printer using the printer admin GUI, then copy out the name that is populated from browsing for the printer
- cloce the admin gui and open a web browser
- go to http://localhost:631 to see the CUPS admin interface
- select the ‘administration’ tab
- click the ‘add printer’ button
- select ‘Windows Printer via SAMBA’ then click ‘continue’
- paste the address you copied in step 1, but add a “%” in front of each “20″ – all spaces are then encoded correctly as “%20″ (in the example above – “smb://my%20printer%20share”)
- go through the rest of the steps and you should have a fully working printer

I hope this helps someone else get things working – this has been bugging me for ages on and off but I’m sure that this has been the root cause of it all along.

No responses yet

Jul 22 2011

New web app

Published by under Uncategorized

I really like Evernote. It’s a great concept, but the actual app itself leaves me a bit overwhelmed as it has far more features than I really need. The real kicker is that there is no easy way to get your data out if you want it. Not too much of an issue with ~20 notes, but I’ve just started to make the investment to move all my notes in and, as I get closer to 200 notes in, I realise that I am making a decision to stick with this software if I go any further. Lock-in scares me every time.

So I am going to sketch up a new web app to try myself. Key features:

  • notes stored as text files in a folder structure on the file system
  • folders and notes create a hierarchical structure of notes to browse
  • clicking a note title shows the note
  • clicking in the text opens the note for editing (via JQuery)
  • notes that begin with a ‘_’ character are secure and need to be unlocked to view or edit
  • notes that begin with a ‘>’ character are public and show up visibly (blogging lite)

Will start this tomorrow and see how it goes. I have three apps on the go now so really do need to sort out how I can get other folks involved to test and provide feedback.

4 responses so far

Jun 28 2011

Writing an app

Published by under geekery,thinking

I’ve been brushing up on my Mac OS programming skills this week, with the intention to launch an app or two on the world to see how they go.

I was in Scarborough for work on Monday so I travelled up on Sunday afternoon and stayed over. I had mentally set aside a few hours on Sunday evening to work on a sample app, thinking I could use the internet as a reference. Unfortunately there was no wireless access in the hotel, so I was hobbled by only having the core documentation to help me. Turns out this was the best thing I could have done. Without being able to ‘cheat’ and look up how to do things, I had to work harder myself to understand how the core elements fit together. The net result was that, at the end of four hours, I had an app that worked, but more importantly, I knew how it worked.

Someone recently asked me the best way to learn programming on the Mac. My answer was:

  • have a clear idea of an app that you want to use (start small)
  • map out the elements you need to build that app
  • read the core docs to understand how the objects need to work together
  • build it
  • extend it by following the same process

I now realise that this was advice I had never actually taken myself. If there had been wireless internet access in that hotel on Sunday, I probably still wouldn’t. Not listening to wise advice from others is bad enough, but not listening to wise advice from yourself? Crazy!

No responses yet

« Prev - Next »