Thursday, June 17, 2010

CodeAssistor - version 0-0-3 release candidate 1

I've improved CodeAssistor in many ways over the past couple of days.
Find is fixed (it wasn't the compiler, see previous blog entry).
FoldAll and UnfoldAll have been added (Man this is sooooo useful!!!)
Long Line wrap has been added

My only concern is that pasting into the search box doesn't work in windows... no idea why.

Anyway, grab it while its hot.
MAC
WIN

Tuesday, June 15, 2010

Never blame the compiler

In my previous post, I demonstrated how I could get codeassistor to perform the exact same sequence of inputs in different ways depending on if the code was optimized or not. Turns out, I was improperly using a structure (didn't set all the values of the structure properly).

Never blame the compiler

Sunday, June 6, 2010

An interesting finding about compilers

In our binary world of software, a set of consistent in-volatile variables has one and only one path it can take through a static codebase. Bugs exist because variables are never consistent or in-volatile; except during unit testing. Unit testing should use a large enough data set to test all possible variable combination sets, but it is nearly impossible to thoroughly unit test certain codebases (eg codebase for a user experience), thus bugs exist.

However, what do you do when your set of variables passing through a static codebase is the same, with two exceptions.
1) user input timing
2) compiler optimization options

Case: "Backwards Find in Windows & TDM of Mingw"
I cannot be entirely scientific with this. Heck this is a blog post and I've found a workaround for my problem. I highly encourge you "the reader" to investigate this more thoroughly and tell me I've overlooked some stupid thing

Problem Desc: When using the backwards find in Codeassistor, backwards find does not wrap around to the bottom of the sourcefile and search upwards for the search term if the search term cannot be found from the current point of the cursor to the beginning of the sourcefile. Unless the codebase is compiled using the -O0 optimization option.

Steps to reproduce
1) grab the codeassistor source and the mullinpatches branch of scintilla.
2) compile the code via "make -f win.mk -j5"
3) after the test application has popped up, press CTRL+F for find and type "ei" (no quotes) then ENTER.
4) Alt+Tab from the find popup to the editor window
5) press F3 for backwards search multiple times

Expected Result:
The editor will jump to the bottom and find the last occurrence of the string "ei"

Actual Results:
The editor will highlight the second character of the sourcefile (in this case a "*")

Continuation
6) Quit Codeassitor; type "make -f win.mk clean" ENTER
7) Edit win.mk and change -Os to -O0
8) repeat steps 2-5

Results (expected and actual):
The editor will jump to the bottom and find the last occurrence of the string "ei"

It seems like the -Os (for that matter all -O optimization except O0) performs the test one way, and the -O0 performs another way.

-Os drops my final executable IN HALF! from 250KB to 124KB. I am not supremely concerned about this because 250 is acceptably small... but what happens if my executable grows to be 10MB ? I would much prefer a 5MB exe to a 10MB one.

Note: the bug might be in the codeassistor, however the code is acting differently to a non-volitle (except user timing) dataset depending on compiler option.

Ipad review after day one

OVerall there are slight problems but it's features make up for them


Typing is much more difficult than a laptop or even a blackberry for that matter. Holding the internet in your hand is they way it's supposed to be. Reading books on an eink screen is nicer on the eyes but the iPad is still acceptable. Watching Ted.com is great. Reading technical papers is good. The speed of the software is amazing.

Saturday, June 5, 2010

Smegol says "It's my birthday, and I wants it"

I bought myself an iPad today. Cause I wanted one.

I want a larger screen book reader for technical papers (http://www.3gpp2.org). I'll give you a review later on.

Thursday, June 3, 2010

CodeAssistor on Windows : Alpha Release

Super Dooper Alpha release for windows

http://launchpad.net/codeassistor/v0-0-3/v0-0-3/+download/superAlphaWindowsCodeAssistor.zip

Find/Colouring/Goto all the stuff that mac has... but there are bugs
eg
- cannot wrap backwards on find

Im sure there is more, I didn't test very thoroughly, but its bedtime and I'd like to have this available to download on other machines for testing tomorrow morning.

Wednesday, June 2, 2010

Find: codeassistor on windows

I have to implement a "Find" dialog for windows. The popup-edit box method I use in mac doesn't work so well because Scintilla takes over from my search-edit box whenever I click the search edit box (the search-edit box is inside the bounds of the scintilla editor).

Im going to have to implement find dialogs anyway, so that there is some better control over find... but yeah, I had to do it for windows right from the get-go.

Anyways, basic find is completed for windows, though there are bugs, you can at least find stuff with it.

Next step is the line-goto dialog.