The STAMAN Project: Phase II, version control

First thing is first: I created the project on my choice of hosting site, than prepped


terry@dixie$ cd ~/proj;git init STAMAN; cd STAMAN; touch README
Initialized empty Git repository in /home/terry/proj/STAMAN/.git/
terry@dixie$ ls
README
terry@dixie$ git add README
terry@dixie$ git commit -m 'first commit'
[master (root-commit) f012d8e] first commit
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README
terry@dixie$ git remote add origin path spec to the repo
terry@dixie$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 222 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To path spec to the repo
 * [new branch]      master -> master
terry@dixie$
In essence, create a new git repo in ~/proj/STAMAN, add a blank readme file and push it to the mirror. Simple.
If you’re not using version control, you’re brain damaged. It’s that simple. 
I recommend Git and Mercurial, because I consider CVS, Subversion, and increasingly Bazaar as well, to be flawed models of doing version control. Git is what I use the most, so obviously I’m using it here :-P.
Much to tired to go into the sanity that is using version control, and using it rightly. Learn how to Google.

The STAMAN Project: Phase I, brain storming an outline

The first thing I did was sit down and spend about 5-10 minutes on brain storming, here’s what I came up with on Monday:

terry@dixie$ cat ~/Dropbox/todo-structure.outline
todo's contain
        task short name
        task notes (raw data)
        location
        assoicated url's
        due date
        time estimate
        associated contacts?
        reminder preferences
        list
        project (tag)
        priority

Shebang! YAML would work WELL
terry@dixie$

I like to dive in when designing a program, try and get a good big picture understanding of it, and try to identify the lower level issues that might chop up. The latter gets easier with experience, particularly with your tools rather than the art/science. After writing that file, I took a few more minutes to focus on the implications of its contents.
The purpose of a task management program, is obviously to manage tasks. It is fairly obvious that it is a fairly data centric program; so it’s a good place to start by thinking about what is the data. In this case, I took a couple minutes to think about what represents a task: what data it reflects. The short name being provided, as a convenience for listing tasks.
We can’t know for sure what sort of tasks will have to be managed, so what data will need to be attached should be kept abstract: it could be anything from a simple cat > notefile like stream of text, or an uploaded doc or photo. The important thing, is not shooting off a foot by making it restrictive.  Since *I* am the principal user, I know the content will be quite variable. Excessively so, the more I utilise it. 
Tagging a task with data like a location, associated URLs and contact info would likely be a good thing. You can easily imagine that going somewhere, talking to someone, or referencing a file off the web are all things that might go hand in hand with reviewing and completing a task.
Another frequent issue is keeping track of when xyz needs to get done, how often it needs to be done, how long its expected to take, and being able to do per-task preferences about the “Nag me about it” problem. Come to think of it, a way to note the tasks progress is a good idea too. Changes like these, are one of the main reasons I want something custom, rather than continuing with my beloved RTM – more control over the tasking details.
Keeping a flexible outline of the project, helps you identify spots to grow and or change it ‘in flight’, just like that realisation about progress tacking. Of course that assumes you will have time to think about the project, not just write its code like a drone.

Next up to plate, is the issue of organising tasks. I’ve got so much shit piled into RTM, that I have to periodically triage my task lists, almost like sorting them into a Trove. Notions of lists, priorities, and “Projects” are useful: in order to more easily create ad-hoc hierarchial lists based on such criteria. This is somewhat analogous to what’s possible using the SQL SELECT and JOIN statements. Database normalisation can actually be a good thing to learn aboutlink.  
SQL is not a general purpose programming language, rather it targets the narrower domain of querying and manipulating rows and tables in a database. Although less needed around non web applications, knowing about SQL it is worth it, much like the concept of relational algebra in general. Why I have mentioned Structured Query Language here, is because it’s a useful train of thought to explore. Take some time and ponder about the possible formats, and what the code to manipulate it might.
A serious portion of programming is about solving problems, that’s what we use our languages for. If changing the rules makes solving the problem easier, that’s what we do. Knowing about various tidbits like declarative languages are valuable tools, if you remember to program more like Captain Kirk instead of a dry text book. Don’t bend yourself to the language…. bend the language to your problem, or find a tool or architecture that can help fill the gap.

Data storage formats are potentiality a lengthy issue, so I’ll go into that later.

With how often people have solicited my advice/opinions of programming matters and CS ed, I’ve been thinking about exposing the craft behind a project, and posting it as a journal entry. Well, the way my mother monkey wrenches things, I rarely have both the time, brain, and inclination to focus on detailing that much.

So instead, it’s probably best that I either decide never to go into the details of creating a program, or just stream it through more haphazardly across my journal. I’ll take a crack at the former, since I would like to work on the program.

One of the things on my “To roll own someday” list, is replacing my remember the milk with a local solution. The perks being that I can make custom changes without having to get hired by RTM o/, as well as integrate it with my work flow more naturally. It’s also a good series of mental exercises.

Since I’m not good at naming things, I’ll just call it STAMAN—Spidey01’s TAsk MANger. Which uniquely isn’t far off from Stamina, exactly the rate limiting factor for getting shit done. Especially under my living conditions.

I can’t believe that I’ve spent most of the last 5-6 hours thinking about ML dialects (SML / F# / OCaml), Haskell, and Lisp :-/

Stupid, just stupid MS!

Another from the same Microsoftee publication:

Consider using events to allow users to customize the behavior of a framework without the need for the users to understand object orientation.

Now I ask you, what part of using an object oriented language to build an obviously object oriented assembly (the guide is on class libraries), in an environment almost universally thought by users to be object oriented, and on top of that in a language that uses object oriented programming techniques to implement event handling.

What next, telling the programmer to only use stack allocated data because relying on a garbage collector is too hard a concept to comprehend? Seriously, who the **** writes **** like this.

LEARN HOW TO ****ING PROGRAM **** IT!!!
Post Script: In the above quote from MSDN, I added the bold on ‘understand’ for emphasis: where as the MSDN library displays the entire message in bold.

Stupid Warning Sign for Programmer

Important! The term “protected” does not imply any security checking or caller validation. Protected members can be accessed simply by defining a derived class of the declaring type.

I do think that is the Object Oriented Programming version of a stupid warning sign . That quote above about protected members comes from Microsoft’s design guideline for developing .NET class libraries. Which obviously means common language object oriented principals apply…. you would hope.

That has also got to be the stupidest cautionary message that I have ever seen in a document intended for programmers. What next, writing “May irritate eyes” on a can of pepper spray!?

Somehow I find it kind of sad, that over 50 years later, we still lack a programming language clearly more advanced than lisp. Either that or lisp just grows with the times better than most 0.o.o.0.

Woke up at 0600 just to get back to coding before work. Fell asleep trying to figure out the solution to a problem and dreamed of getting my eyes checked, ending up dizzy as heck. Woke up and fell asleep trying to figure out if the compiler is smart enough to tune the solution without my “Help”. Then dreamed of chasing Escrt around a modified RvS game with iron sights, before falling down a 50~70m pit in the process lol.

It’s true, reading around MSDN is that boring.

Well, while I’m waiting on a subversion command to finish (on another project), I may as well flush my train of thought, in between wondering how any large project can bare to use subversion lol.

One of my open loops is a component called the “Data Browser”, it’s meant to provide a view into data extracted from a projects source code, and present that data to the user: while bridging that browser interface into the rest of this programs peers. In less abstract English, it’s a tags browser. Go figure.

Something I love about programming, you can often express a notion in 3 words of code, what would take 10 words of English to describe. How that works? You can reduce the English word count with the use of insider jargon, but being a programming language, outsider is redefined as those who can’t read the language rather than those who don’t comprehend the associated tech speak. There fore the word count falls significantly.

My present train of thought however, is concerned with how the data should be presented: what is most suitable for the user. The fact that the program is designed first and foremost for my own convenience is aside the point :-o.

In search of the holy grail of user interfaces: I’ve found this the most optimal method.



+---------------------------------+
|  [-] Classes                    |
|      [+] Foo                    |
|      [-] Bar                    |
|            someMethod()         |
|            ....                 |
|      [+] ....                   |
|  [+] Functions                  |
|  [+] Macros                     |
|  and so on                      |
|                                 |
+---------------------------------+


where as much information about the individual items has been omitted for the sake of brevity ^.

Properly expanding the tree for a given type of data should display information unique to it. I.e. what is most pertinent to *that* type of data, rather than a common subset that applies to everything.

Columns for a methods display might look like:

| name | signature | return value | visibility |

where as the columns for classes, as opposed to ‘Bar’, might look something like this:

| name | visibility | in namespace | 

.

In a perfect world we could do this over a sandwich without much coding. Using the GTK+ TreeView widget and friends, grepping the manuals suggests that life is just going to be waaay easier if each element (Classes, Functions, Macros, etc) of the tree becomes a separate tab holding a specialised treeview as part of a Notebook widget! I’ll look into it closer when I have more time for that.

Now of course the tree view could simply show the lowest common denominator for info, and rely on a “Properties” button to show the individual details for the currently selected item, or we could (barf) just have expanding the trees spawn a new window customised to that type. But nether are to my taste.

Enough rambling, time to get a move on while subversion continues to (ab)use my networks bandwidth.