Thursday, 3 December 2015

Cheatsheets

When I'm working, I like quick references to documents or notes I make. This is often the case with things with fiddly syntax, like BASH. Cheatsheets are a great way to summarise information for quick look up.

I wrote some HTML and Javascript to format Markdown notes into something more readable, with extra browsing functionality. The advantage of using Markdown is that it is quite readable as text, and on Github the preview is nicely formatted. All the formatting is done using jQuery, live, in the HTML page.

The project is on Github (As of writing the notes are still a work in progress!). It is very easy to add new notes by just adding a new markdown file. Updating shared notes between locations is as easy as git pull.

Here are some example BASH notes:

Syntax highlighted code examples.

Extended formatting for defines.

Key shortcuts.

I used Bootstrap to get themes and layout easily. There is syntax highlighted code, via HighlightJS. I also added some extra markup syntax for lists of things, like defines. It really is quite impressive what quality open source Javascript libraries are available these days.


Saturday, 7 September 2013

GWEN SDL2 GUI Renderer

To try out the new SDL2 SDK I ported GWork (a fork of GWEN) to it.

It mostly went across quite easily, apart from reading pixel values, which GWEN uses to get the colours used when drawing. It is difficult to read pixels in a texture as you don't know the format, so I had to keep a surface. Apart from that though it was fairly easy.


SDL2 renderer Mac OSX 10.8

SDL2 renderer Windows 7

Please read the readme at the Github project for more details. If you have any problems report them at the issue tracker.

Enjoy.

[8/9/13] Premake works for Windows now.

Saturday, 25 August 2012

MacPorts notes

Some notes on use MacPorts on the Mac.

Usage

Packages

Find new packages:
port search name 
 Find what is currently installed:
port installed  

Maintenance

Upgrade existing MacPorts database:
port self update 
Update outdated packages (e.g. after database update):
port upgrade outdated 
Remove old packages (e.g. after updating outdated):
port uninstall inactive
Clean up to save disc space ("du -hs /opt" to find existing usage before and after):
port clean installed


Saturday, 24 March 2012

Mac terminal replacement - iTerm

If you ever use the command-line on the Mac, the default system terminal works, but having colour syntax highlighting and better presentation makes things a lot easier to read.



An alternative is iTerm:



iTerm history: Version 0.10 iTerm still works if you want simpler version. This was mothballed when the lead developer became a brain surgeon! (almost). It has been patched for OSX Lion. iTerm2 is still under active development. You can also get it with tmux support (but I don't use this).



Wednesday, 14 March 2012

Xcode 4.3 Complaints!

Just downloaded and trying Xcode 4.3.1. Quite frankly, after 4.0 and 4.1 I gave up and went back to Xcode 3.2.6. I'm sure this has been said in other places, but I think Apple have deprecated Xcode 3 too quickly and moved to something which was at best alpha quality (4.0), and is now beta quality (4.2+). That said, Xcode 4.3 does have a more "solid" feel about it.

Other people also have taken issue.

My issues with Xcode 4.3 are:

Key maps

The keys still clash with system defaults. I like Command+N for swapping desktops. Single-step etc clash with functions on laptop keys. Why not add the Xcode 3 mappings as an option? Why did you need to change them? You can use the Xcode 3 keys on a laptop or desktop keyboard quite happily. And not having to remember a whole new set of keys is a big win.

Editor

Simple things, like, which column am I in? Where is this displayed? This is basic stuff for a code editor.

How do I compile a single file? Seriously. Come on.

UI

You cannot drag any of the side panels around. What about making the sidebar items (project browser, objects, errors, etc) dockable/moveable so that you could have some on the right? E.g. file browsing on left, but then error list on the right. Or top and bottom of the sidebar? Should remember layout between sessions. Same for debugger features. -- If you have used Eclipse then there are lots of solutions and alternatives with a more flexible approach like that.

This is more of a minor one, but the toolbar at the top occupies too much space. It hardly displays anything. Maybe merge it into the title bar? Make icons smaller?

Top toolbar takes up too much space.
Version Control

I haven't really used these features because I use Mercurial. It's just what I use. Why not add Mercurial support, it is not going anywhere. It is a good DVCS. You have also removed Perforce support, please re-add.


Summary

Apple: I haven't used all of the features of Xcode 4, and I'm not a full time Apple dev. I know Microsoft are making Visual Studio worse, but do you have to try and compete with them? Xcode could be so much better if you didn't try and change everything at once. Leave the Xcode 3 key maps. At least then people can turn a blind eye to the other shortcomings of the IDE. I'm sure in a year or two it will be a better IDE, but right now please address the day-to-day usage issues instead of trying to cram in more functionality.