Monday, December 24, 2007

New experience in C#

During last week I was doing rather interesting work: programming on C# my own Windows control similar to TextBox class. I was programming a text editor and needed to make color syntax. But RichTextBox allows to change color and other properties only for selected text, that isn't good. So I've decided to try to make my own control to work with text. Now it is rather good and implements some common functions. The most important is that I've understand that this is *really* possible, not only on paper. And through developing this control I've experience many difficulties. So now I want to write something like "How to make TextEditorControl on C#". Of course not on a professional level but I think I need to write down all this experience, while it fresh in my mind. So in future it will be easier for me to implement similar things. Moreover while writing I will unconsciously analyze what I'm writing and may be will get better solutions or completely new ideas.

Furthermore I want to write similar article about making tool to explore .NET assemblies using reflections. I already have basic implementation of such a tool and it need more polishing.

Bye.

Sunday, December 09, 2007

Funny Bug in Visual Studio 2008 Beta

While uninstalling MS Visual Studio 2008 Beta 2 I found one funny bug.



Trivial message from uninstaller that indicates that one or more of the files or directories to remove are occupied. The only thing to do is too close this application and click Retry. If this doesn't help, well click Ignore and hope this will not have any negative effect. But... what the heck is application named 4812? Well, it's may be not a name but an ID of process so I open Task Manager and look up for a process with ID 4812. Here it is!



Oops. It is a setup application itself blocked something and couldn't delete it. I tried to click "Retry". And it was a successful attempt process of uninstaller continued.

I even could make a guess why this short story happened but had a good final. While checking files/directories to remove setup.exe locked them. According to my guess releasing of lock is placed in destructor. When message appeared object that locked files was "deleted" but garbage collector wasn't called until that moment so hadn't called destructor. While I was thinking about this problem and taking screenshots garbage collector was invoked and called destructor that released locks. Of course this guess can be true only if setup.exe is using garbage collector. Well, as Andrew Troelsen in his book about C# suggested it is better to manually call method Dispose and release all resources when they already could be released and don't leave this job to GC, which is unpredictable.

Of course my suggestion is only a suggestion, but I think it is rather useful to try to explain bugs in not your applications even if source code is inaccessible.

Wednesday, December 05, 2007

The Dialog with Myself

I've already written that what I want to change in myself. Surely it's not easily to change myself (at least for me). And I think that to put off bad habit may I need to have split personality in some way. And one of that personalities must say "That is bad, don't do it" when it is needed. May be this should be something like fight between good and evil, though I'm not sured that someone in me is really good or evil. May be both of them should help each other. There must be a dialog inside of person, dialog with himself. But how to speak with myself? The most obvious way for is to have to "Me's". May be this a psycho disease? But to learn on fault your need to have someone who will point on them, and nobody as you can now what you do and why you do.

Visual Studio 2008

In the end of November MS released the new version of its IDE Visual Studio 2008. I've used Beta version already. It that post I've written that first impression was that is is very buggy, and later practice showed that there are some mistakes. I usually had some problems with Intellisense and IDE crashed. I have to note that I used Professional Edition.

Now I'm using Express Edition. I'm not so rich to buy IDE now, so use free edition. Of course it's not so functional as Pro version and for each language (C#, C++, VB.NET, Web development) there is it's own IDE. However I'm currently programming only on C# so this is not a big problem for me. Visual Studio is rather comfortable IDE (especially comparing to Turbo C we have in unversity :(. The problem is that it can't be used for editing all types of files I need with syntax coloring. So for editing files such as Nullsoft installation scripts, Python files and others I use PSPad. But for C# Visual Studio is much more preferable because autocompletion, Intellisense and many other small but very useful features.

One interesting note about Visual Studio: with IDE many other components are installed (SQL Server Compact, etc.). But uninstalling them is a manual operation. Not rather comfortable.

I have to say that Visual Studio is one of my favorite MS products and I haven't a lot of complains about it.

Saturday, November 24, 2007

What I Don't Like in Myself

There are some thing that I do not like in myself. Often I'm not tolerant to others in relations with other people. I sometimes behave too angry towards people around me. And moreover I'm took weak physically, especially in strength of arms.

What do I do to surpass these problems of my nature? Firstly, to become stronger I try to do everyday exercise with weights. And I think that gave me some positive result in strength of arms. However I have some problems with strength of will in aspect of physical exercises : in fact I don't do them everyday but usually one time in two or three days. That's not good. And I still continue to make them regularly everyday. Now that's not a problem of physical strength but of strength of will above laziness.

Furthermore how do I improve my tolerance to others? That's far more difficult question than just physical strength. I think the reason for angriness toward others is in some way linked to my warlike character and to that I think there are some traits in people which couldn't be tolerated. About this I'll try to write in future. And now I have to say, that I try, really try to tolerate other people while they act in way I do not like. Sometimes I say them, that I don't like what they do, and wait whether my word will have any effect. And I keep waiting for good changes. But sometimes... behavior of one goes beyond borders which as I think are acceptable.
Or I'm just tired of them and can't keep dam of my patience. So then comes something that is like affect: I'm very-very-very angry and behave in a way I don't like after that.

So what to do? I think, just try to understand others imperfection, accept them as they are (but may be not accept their bad traits?). It is better to have a war with own bad traits than with others', it is easier to make better yourself, than the others, but others sometimes need help to become better.

Sunday, November 18, 2007

Relaxation day

Sometimes there are days when I don't do almost anything. I just read something for fun, play games. I want to do something but in fact can't make me to do anything. I think that's are relaxation days. One such day was today.

Sunday, November 11, 2007

This week

Previous holidays was rather productive: I've made a lot of thing especially in programming and in study. That was a three good days. After that I've got not very good working week: I've studied a lot, made homework but that took a lot of time, I was tired and bored toward evening. As a result I haven't done much progress in my tasks.

So now are another holidays. This day wasn't rather productive, though I've made more than on workdays. And moreover my favorite football team FC Zenit became a champion of Russian Premier League!!! :)

Hope, next days (I haven't got study hours on Monday) will be more productive.

Pragmatic Programmer

Pragmatic Programmer is a classic book for many programmers. It has valuable advices and techniques, which aren't linked to any language or environment, they are applicable to programming as it is, without any additional conditions.

I've read it in September and was highly delighted with it. I think there are two main things I've got from that reading: serious attention to automation and taking responsibility about your decision and having proud of your work.

I've read about automation before PP in "Code Complete" and understood it advantages, but didn't use it actively. Though in PP I haven't read anything new about it I've understood it better and decided to use it more.

Moreover authors of PP actively convince programmers to proud of their work, not think "it is the best program in the world!" but always left your sign on it, never lie that "it's not mine!", taking responsibility about its errors. It is applicable not only to programmers, but also other people who's work is about crafting something new.

I highly recommend PP to all programmers, who haven't read it already and for those who already has a copy of it to read it again, I'm sure you still can get something new from it. :)

Thursday, November 01, 2007

My Own Scripting Language for .NET Framework

I've wrote about dynamic languages and that they are good at combining already written components into full application. As I'm programming at C# now which isn't very laconic and simple language I have an idea of scripting language for .NET Framework. There are a lot of languages ported on it, among them: Python, Ruby, etc. But I still has an idea of implementing my own interpreter. It will be very useful in implementation of DSLs for my own applications. At least if I wouldn't be .NET programmer I'll get a lot of experience in developing interpreters. It's not a simple task but very interesting and useful.

Currently I'm working on library of common classes for .NET. I wasn't pleased with standard implementation because I didn't find a way for customization, e.g. changing path of saving configuration file.

Also there is a LogFile class, which implements DebugListener abstract class. I attach it to Debug to write down messages about errors.

P.S. I've passed all laboratory works in programming and think now I'll have more time for non-study programming.

Monday, October 29, 2007

My reason for blogging

Why I blog? There are some reasons, but they are connected with each over:
  • Develop my skills in English language — many people think I'm rather good in English, but I think there is enough space for me to develop in this direction. May be my friend think that I'm good at English but this comes mush more from that they know it worse than me, not from that I'm good.
  • Develop my speech writing capabilities. This is close to previous but it isn't connected to particular language. This is ability to shape idea into clear explanation. And the language is a tool to express it to others.
  • Develop my mind. When I write about something I think about it. And what is more I watch this from different angles and have different points of view on it. As a result my brain works and moreover I could make my opinion about something having different points of view as a base. Overall blogging trains my brain so it will give ideas. And this links to previous reason: these ideas needs to be shaped into explanation.
  • Specially for programming blog: by blogging I share my knowledge (if anybody is interested in it), that will help myself not to forget results of my programming experiments and of course as in previous reason while wring post I analyze topic and shape my opinion and develop me programming mind.
All in all: blogging is an output produced my my mind by analyzing input from books and my experience.

[Update] Well, as you see sharing knowledge isn't my goal. But I think that is a very good use of blogs. So in future I think I'll add this to my reasons. Probably after I'll train myself in English :-)

Winter session exams: Programming is already passed

It's not a secret that I love programming :). And I'm rather good at it. So I've decided not to wait end of semester to pass all laboratory works on programming and passed last this Saturday! 9 works in 8 weeks — good result I think. And I won't need to pass exam on it. Now I only need to make a documentation to my coursework. So now I'll have more free time. :)

Dynamic and static languages

As I've mentioned I'm reading a "Design Patterns" by Erich Gamma. Yesterday I've finished reading about structural patterns. I have to say that this book contributed a lot to my understanding of object-oriented programming, not only in a way of giving information about patterns, but also about whole programming. While reading I've often found examples of difference between dynamic programming languages and static ones.

In most cases dynamic languages looked better that static. Some methods hard to implement in static languages are easy to implement or built in dynamic languages: creating prototypes, changing behavior of object on-the-fly, programming by interface not implementation. It's not a secret dynamic languages such as Perl, Python, Ruby, etc. usually require less amount of code lines than static like C++. This mainly provided by different approaches to code handling: static languages are usually compiled, while dynamic are interpreted.

Dynamic nature of languages like Python provide rather wide abilities to work with classes and objects but in most cases programmers doesn't need available but rather low-level features (does we need very often put definition of function in if-statement?). And the cost is slow execution speed. Moreover if there is an error in program developer will know about it only when interpreter will reach this piece of code, while some of such errors could be caught during compilation.

As I think, is that in most cases interpreted languages are enough good for very big range of application what is proved by current trends in programming. But compiling languages still are rather popular. They are much better in implementing complex algorithms which uses a lot of resources. I agree with J. Ousterhout in article "Scripting", that static languages are useful for complex data structures from basic data types, which are often accompanied by low-level difficult to understand algorithms; and with dynamic (scripting) languages we can combine this elements to systems. Present dynamic languages (at least as I know Python and Ruby) provide an ability to plug into program modules written on C/C++. Thomas and Hunt in "Pragmatic Programmer" wrote a lot about DSL (Domain-Specific Languages). They can be thought as scripting languages with very tight integration into application. I think in future we can expect not only the expansion of using of dynamic languages but also developing of more tight integration between them and static languages.

Wednesday, October 24, 2007

My Example of Factory Method Pattern

I found rather useful reading a "Design Patterns" and found some examples of those patterns in programs I've written or read. And some days ago I've used one of the patterns - Factory Method.

What was the case? I've wrote two types of collections for C#: Vector (casual array) and LList (Linked List). They have the same interface ISequence and sane base abstract class SequenceBase which implements most of operations leaving virtual only basic operations, such as Insert, Remove, etc. And I wanted to have tests for all methods for both implementations. I'm using NUnit, and I didn't wanted to have two test classes with identical content, in except of operation new. So what I've made:
  1. Wrote an abstract class with all test cases (e.g. SequenceTester). All test methods have their Test tag.
  2. Class defines an abstract method Instance, which returns an object of tested interface, ISequence in my case.
  3. In all test methods I use Instance instead of operation new.
  4. For each tested class I define a test class derived from SequenceTester. In have to implement only Instance method that returns an instance of tested class and tests for an implementation of interface is ready!
The only thing I need to care is to add a test class for each implementation. Rather easy? ;) And moreover generation of concrete test classes could be delegated to special tool run before test process and building of tests.

Whats is good, as I think, is that such an approach could be used to test all implementations of each interface. Write tests for interface in abstract class, write tool to search implementations and generate required test classes and you can be sure that this interface work well in all cases, or in other case you get a pointer(s) to error(s).

I think I'll try to use this approach in my practice and write such a tool to make concrete classes for tests of interface implementations.

Off-topic: While writing this post I again faced the question: why implement array and linked list with same interface? The difference in the way they work make some operations unsuitable for one type while be good for other, so why include these operation in common interface? I think it's the question worth its own article, so I'll explore this question in future.

Monday, October 15, 2007

What I've done and haven't done

Firstly, I had written this post to my software blog, but then I've decided that it isn't software-specific and should be posted here. However I'm too lazy to revise it and remove "programmisms" from beginning part.

It is useful sometimes to take a pause and look at what you wanted to make some time ago, what you have done, what you are doing, what's the progress on it and what you want to do.

What I've wanted and what's the result?
  • I've wanted to pass all these labs in different subjects. Success.
  • Successfully finish study at courses of databases. Success.
  • Daily read news from internet. Successful in whole, thought I've sacrificed some news-feeds because it is too hard to read 'em all. Success (may be not full, not sure)
  • Regularly write to my blog (now I have two blogs). Not very good results: I don't write much to them. Thought I haven't dropped and forgotten them, so Partial Success.
  • I've wanted to read a lot of books. From those in list I've read only "Code Complete". But I've read two another books: about C# and "Pragmatic programmer" (Aahh, I haven't written about that! Need to fix that in near future!). And now I'm reading "Design Patterns". And I really want to read any book about UML. Result: All in all I think that's a success, however not following first plan.
  • Write some software to practice. During summer I worked on Egnoly text editor. And now I continue to work with .NET Framework, have some projects in mind and write some code for libraries on C#. Success, not 100% but about 90%... :) Or I'm not objective and too love myself??? May be...
  • I still haven't got a girlfriend. It isn't programming of course but has an effect on mind and mental condition.
  • I still have got chaos on shelves I don't use regularly. Terrible, but there is a relative order on my desk :)
  • I haven't made my programming language. May be I'm too young for that. But this idea still in my head and don't want to go away, instead it becomes stronger and stronger after reading Pragmatic Programmer.
  • I wanted to use Test-Driven Development, nut still don't use it actively. However I regularly try to write tests for my applications. And they give the result! So I think that's a matter of time. May be I'll not become a TDD programmer, but the one who actively and properly uses tests. Result: 40% of Success.
  • I've taught myself to actively use scheduling. Now I use not a calendar but a Todoist and I often don't follow it but I've already have a place where my wishes and plans on this day are written.
  • Something more that a achieved and haven't achieved. Couldn't remember all of them.

What I'm doing by now?
  • Studying
  • Writing some soft on C#, not very useful, but some practice
  • Also reading Design Patterns: useful book, sure I'll write review about it!
  • Participating in open source project Battle for Wesnoth as a translator.

What I want?
  • Make such list and judgement of results rather regular.
  • Follow schedule that I'm making for myself. And make this schedule more wisely and realistic!
  • Develop my relations with human beings :). I don't want to communicate only with computers.
  • Still want to make scripting programming language.
  • Write software on C#: develop Egnoly, common stuff for .NET, and something new, i.e. tool to synchronise my desktop PC and laptop.
  • Study well in university.
  • Continue and develop my participation in OSS projects. May soon I'll be able to contribute to Wesnoth as a programmer? Or contribute to another project either as a programmer or translator.
  • Start project with my fellows. There is no concrete plans on it, now it's a long-distance target.
And again: I want to make this list more clear. At least more clear for me :) And update it regularly.

[Update] Add target to communicate more with people. Just forgot about it :(.

Thursday, October 11, 2007

Some major tasks for close period finished

During last week I've spent much time visiting hospital and passing some physical examinations. It took rather a lot of time especially because of long distance between my home and hospital.

During last weekend I've made a lot of study work and for now has lesser major tasks to do. I've done functionality of my coursework on programming and now need to make program look good and make report for it.

Coursework is one of big projects that lasts more than a few days. What other big projects do I have? At first it is reading books. Now I'm reading "Design Patterns" about programming. My programming projects got some attention on last week but on this week they have lacked it. Hope I'll correct this in next days.

Eh... No any ideas more for now, I'm going to sleep... I've slept rather a small time during last days.

Sunday, October 07, 2007

Implementing custom tool in Visual Studio 2008

I've recently wrote about making tool to generate C# code. We may say that are macros for C# (it fact it is only one defined macro — for fields and properties).

And how to implement this tool? There can be two ways: write tool on scripting language that generates C# code file and is called before compilation. Another way is to use ability of Visual Studio to switch user custom tool for generating files. Firstly I've implemented tool by first way on Python and now I want to make a custom tool for Visual Studio written on C#. But how to plug custom tools in Visual Studio? Now I've got an answer, though I've spent much time to understand this.

Firstly, to develop plug-ins for Visual Studio it is needed to download Visual Studio SDK (for appropriate version of Visual Studio). I have to say that after installing it my Visual Studio 2008 Beta 2 became very unstable: IntelliSense regularly produces errors which crashes the whole Visual Studio.

After that Visual Studio will add templates of its addins. That's a base for future project (although may be addin can be created without all that stuff that is in template).

To make custom tool for generation of files the one must implement IVsSingleFileGenerator interface. I've spent a lot of time trying to make this and fails mainly because if this problem: in some places of documentation it is said that function generate gets a parameter of type out IntPtr[], in some it is said that it is out IntPtr and in fact interface has just IntPtr[]. Not any out! So how should I return value of pointer? Ok, I'm not a great specialist in .NET and arrays a sent be reference. Even if this is not a problem why there is an array not one pointer? Another outgoing parameter of function on exit must contain an amount of bytes in that array but how this will help if I'll allocate a different amount of bytes in different pointers in array. However I don't see a use for an array and just tried to allocate it and use only index 0. But this doesn't helped me and I failed in implementing that interface. May be that a bug in SDK and interface must have out IntPtr[]? Don't know I'm not a guru in Visual Studio.

I've failed to get a proper answer from MSDN documentation and my attempts so I've googled this problem.I've found some solutions but the most notable part is that in Visual Studio 2003 there was an abstract class which covered that horrible interface under much more comfortable interface. However "evil" Microsoft removed that class from version 2005. But good guys placed dll with it in Internet, i.e. here. So It's needed to implement function GetCode from that class and tool is ready to use!

However it is still needed to plug it in Visual Studio. First step is to register it as a package. This can be done by tool regpkg. It is placed in <%MVS SDK Dir%>\Tools\Bin\ directory. Just run it with a path to our compiled tool as a argument. This step can also be done manually,

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<%MVSVersion%>\CLSID\{<%guid%>}]
@=<%Tool name%>
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"ThreadingModel"="Both" "Class"=<%class name of tool%>
"Assembly"="<%asm name%>, Version=<%asm version%>, Culture=<%culture%>, PublicKeyToken=<%public key%>"


As you may noticed custom tool must be in GAC. May be there is a way to keep it somewhere else but I don't know.

What is next? Registered custom tool need to be registered as a generator. In registry dir of Visual Studio there is a directory Generators. There is some dirs in it: FA... is a C#, 16... is a VB.NET. It is needed to register tool for each language separately. In directory of proper language add directory with name of your tool, i.e. for my tool called CSGen:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators\{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\CSGen] @="CSGen tool to generate code on C#"
"CLSID"="{<%clsid registed in \CLSID\%>}"
"GeneratesDesignTimeSource"=dword:00000001


After that start Visual Studio choose file in project and in properties type name of custom tool. After each save file will be regenerated. It is also can be forced manually: right-click on file in Solution Explorer and "Run custom tool".

These articles with examples could be helpful (I'm not a good explainer, just learning):

Wednesday, October 03, 2007

Tool to generate code on C#

While reading in "Pragmatic programmer" chapter about automation I've formed an idea of creating a tool for C# which will reduce amount of manual typed code and as a result help to avoid errors.

Now I've got only one idea for this tool, but maybe in future I've got some more. So that's an idea? In many cases I've needed to create a public property and private field to keep value of property. In some cases I also need to create an event which will happen when value of property is changed. It is a lot of similar typing work. Of course it can be made easier by Visual Studio snippets and I've used them, but this still leaves much work during maintenance:
  • while renaming I need to rename field, property and if exists event. Of course refactoring capabilities of IDE free me from necessity to search of uses of this names, but I still have to rename 2-3 elements of class.
  • I have to have separate snippets to cases when I don't want to have an event, or want to make set private. Also when this details are changed during refactoring it is needed to make them by hand.
  • It takes a lot of locs. If it be possible to write all of necessary data in one line it will be much better to read and understand.
So I've written a tool on Python which eliminates these problems. It parsers file and search for special marker in commentaries. When it founds it, tool reads options and replaces this code with a valid C# code. Lets look at example:

public event EventHandler DoubleFieldChanged;
private double _doubleField;
public double DoubleField {
get { return _doubleField; }
set {
this._doubleField = value;
if ( this.DoubleFieldChanged != null )
this.DoubleFieldChanged(this, new EventArgs());
}
}

Is an original code on C#. Most of these tokens are just speaking what is already said by others. It can be replaced by just one line:

    // @Field double Double Field

Note that name is written not as identifier but as a casual name. My tool automatically forms valid identifiers for field, property and event. And if field is renamed all identifiers are changed by program not by programmer. Moreover 10 lines are replaced by 1! Of course not in all cases such tool can give so good results.

Moreover my tool already can read some parameters of created field. Want to have set be private? No problem:

    // @Field double Double Field( private set )

And tool will make the rest. The same way I can command it not to generate event (and of course not to call it!). Of course both options can be combined together.

My tool (arrrhhh... I call it csgen!) also provides basic customization to format of output identifiers. But now csgen couldn't make complex generations. In some cases it is needed to manually create all of this code on C#.

Though I nave some ideas of making csgen more useful. For example if set needs to check incoming value. Just add to description something like: // @Field: set requires Checker.IsValid(value) and throw an ArgumentException in case of invalid value. To implement this feature I csgen will need all text after requires and paste it into if condition. Moreover in such way can be implemented some other features.

But there will be a problem: compiler will point to errors in generated code and show its line numbers. So programmer have to read faulty code in generated file and then match it with content of original file and fix errors there. Not very good.

However to finish on good news I have to say that tried to implement this feature as a 'custom tool' in Visual Studio. I'll soon write post about it, but I can say that succeeded to write module that returns IDE text and it works with it!

Sunday, September 30, 2007

I've found free time!

Yeah... During last days I've spent rather a lot of time doing non-university work. Although it was programming and nothing more. Not very good for psyche for now I have no ideas what to do else. Moreover I've broke up with girl friend a month ago, so I've even didn't meet any friend in September (in except of in university). Eh... Sp for mow I've only have the ability to sit behind my computer until 2 o'clock at night...

Tuesday, September 25, 2007

Some free time coming?

It's the end of September and I'm rising my study activity. On last Saturday I've passed two laboratory works in programming and today I've passed one work in physics. Badly only for 4 points from 5. But that was a result of that I didn't remember one formula, so I'll try in future to understand information better.

Also I've finished reading book "Pragmatic programmer". I think the next book will be "Design Patterns". It content looks rather good and was mentioned some times in PP.

Also at these days I'm collecting some medical documents for me to be approved as unsuitable to serve in Russian Army. It's makes some problems because I need to visit a lot of organizations only to be sent to organization of lower level.


Thought, I hope in close time I'll finally could make me give myself more free time from university study. Apparently writing this post is a result of that intention. :-)

Monday, September 17, 2007

Pareto principle

Pareto principle is a well-known rule of effectiveness. It also called 80-20 rule. In brief: you get 80% of result from 20% of effort.

It means that to get good result you don't need to work very hard. Just work and do only necessary things. To use computer you don't need to know details of its construction, you only need to know it's user manual. Of course knowledge of it's CPU specifications can make you a better user but in most cases it is spare. You need much lesser time to get most important knowledge than to become an expert. And the use of Pareto principle is that you don't need to be an expert in most cases. But what is also very useful: you can get a lot by little effort. So even if you read a small book about unknown theme you can get rather much knowledge.

Of course that don't mean that you needn't to be an expert at all. I think to be successful you need to be an expert in something. For example in getting much knowledge without great efforts... Or, what is much better, be an expert in living your life.

Asciidoc

I've recently found new tool for me: asciidoc. It is intended to create documentation in various formats from plain text. What is good that markup elements are not like but more simple symbols so text can be easily written and read without conversion to other formats. I think I'll find use for asciidoc in my projects. Documentation is always needed.

Sunday, September 16, 2007

Again and again: where is time?

So I've recently written that I have a lot of work and now I've realized that now I couldn't find time for my own activities, i.e. programming. I was constantly working during this week and made a lot of work, but it all was about university. And next week doesn't promise to be different. What to do? How to make all university staff and made something for yourself? Again I meet this problem. Of course "myself" isn't only programming, it is also other thing but this is the first about which I think. Tomorrow I will visit big book market with my friend. It is better than sitting at home all day.


What to do?
  • Firstly, now I'm actively using Todoist to manage my tasks and time arrangement. I still couldn't use calendars or organizers but I found a good use for that simple webapp.
  • On next week I'll try to find time to do something that is not-university. Surely it will be some programming (and what you awaited from me? :).
  • May be found some non-computer activity? Or at least non-programming? I couldn't guess what it can be.

And also about my current activities: some of my time is spent on working with book for one of our professors. He has a book about his subject but it exists only in one instance. So I've scanned it and now make text recognition. Rather dull work because my OCR is rather simple (but free).

And idea of a day: Do something meaningful :)

Wednesday, September 12, 2007

A lot of work

Eh... I've started new studying year, and now have a lot of homework. And I'm trying to do it as soon as possible. Before new tasks will come. For a previous day I haven't found a time for programming, but hope soon I'll allocate my time better and find some time for my hobbies :). And I've bought book "Pragmatic programmer" by Andy Hunt and Dave Thomas!

Update: add a link to http://www.pragmaticprogrammer.com/ on book title.

Monday, September 03, 2007

Home network

As I've already posted I had bought a notebook. An now I'm writing from it. I get a wifi card to my desktop computer. It's a D-Link DWL-G510. Both notebook and card supports 802.11g so I've expected rather speedy communication (54 Mbps). I've got it. But only after some "adventures".

Firstly, I found that by default my computers try to found wireless router and communicate across it. So I've needed to create "computer-computer" connection. Really it took me a lot of time to understand this. May be I should google theory of wireless networks, but it's not my habit to google something :(

However after a lot of clicking-and-typing I've got my computers connected in a network. But there was another problem: I wanted my notebook to be connected to internet through desktop PC. I shared my internet connection on it, as my friend advised, but this gave me nothing. After some stumbling with that problem I found that the solution is to set correct IP-addresses on wireless connection on notebook. May be something is spare but for know I haven't got a desire to make new experiments: set DNS-server IP to same as in internet connectio; set mane gateway to IP-address of wifi-card on desktop. After that my connection started to work!

I have to say that there is no significant slowdown on working with internet on notebook. Despite added wireless connection all works fine and rather fast. Sometimes there are pauses in connection to internet but they also exist on desktop so I think they are the result of a work of an ISP (or my software).

All in all I'm pleased that I've got a wireless connection at home and now can work with internet both on PC and notebook.

Thursday, August 30, 2007

My notebook

Today I have bought a notebook. It's an Acer Extensa 5610. And it is with Vista Home Premium. So soon I will be able to say me opinion about Vista. At first it looks impressively. I hope my new notebook will improve my productivity: now I'm not wired to any particular workplace and can even work in university in my preferred environment.

Soon I'll write about my first impressions!

Friday, August 24, 2007

My source code library

Next programming book I want to read is "The Pragmatic Programmer" by A. Hunt and D. Thomas. While watching through it I found advice: "Never drop to garbage not-working or unused code. It will help you to avoid same mistakes" (of course that isn't very exact cite). So I've take my step to keep my knowledge base — I've started on Google Code my own project. There I'll keep my code, feeling sure that it will not disappear with hard-drive crush. And also, I'll have access to it from any place, that will have internet connection. Rather useful.

Google search through source code is also can be good to find information.

My recent .NET programming

A month ago I was writing about bugs in Visual Studio 2008 Beta 2. All in all I've escaped trouble and for a month I was using it. Professional edition to be exact. Of course when the Beta will expire I'll be forced to move to free Express Edition. And know I'm studying .NET and C#.

Book of Andrew Troelsen is almost at the end: only 2.5 chapter remain for me. They are all about ASP.NET and Web.

Moreover my text editor became much better. Though it is still have not vast functionality. I have an idea of turning it into IDE for any computer language (Python and Ruby are first candidates), but as I think this is not the matter of near future.

Programming for .NET on C# was good and effective, though there are some things that I don't like in it and want to replace them by equivalents from scripting languages. Of course that relates to new computer language. I made it to parse arithmetic expressions with integer numbers and make *.exe file that performs all these calculations. Not very much and I've stopped on trying to implement print function. The problem is not in the implementing particular built-in function but much more in whole mechanism of implementing functions. I've decided not to make thinking about it, but to take a pause. Though this idea firmly seats in my head so I think I'll return to it after gaining some experience. And moreover I'll need some time to feel pace of study on second year!

Furthermore now I'm working on .NET library to create diagrams. I've wanted to have one to make colourful diagrams from my data which is output from scripts, not in Excel format. For now it already can make proper diagram! So in future I need to add much more customisation to it.

Moreover, I've tried Ruby. It looks rather interesting and has simple solutions for problems which I've already faced in other languages(and not yet faced). I'll study it more deeply and try use it in my projects. For now if I need to make some routine tasks I prefer Python. Hope in near future I'll write more on computer languages.

— Buy! :)

University is coming

That was a long time since I've write last time. And my new study year is coming soon. Now I'm having a two-week vacation. And relax at home. Err.. relax means do some programming :). I've made something that is text editor. May be i near future I'll advance it be something like IDE for a computer language. But I don't know which language :(. Or may be I should better just use Eclipse and Visual Studio? All in all, if even my text editor will never be useful, I already have got some experience from it.

Moreover I've joined team of developers of computer game Battle for Wesnoth... not as a programmer, but as a Russian translator. Who knows... may be in future I'll help as a programmer. But future is in future and now is today :).

Hey! And soon is my birthday — 18 years!

Thursday, August 02, 2007

Microsoft Visual Studio 2008 Beta 2 — too bugy

I've recently started to try latest release of upcoming Visual Studio 2008 — Beta 2. But I found it having much problems on my system: Visual C# Express Edition crashed on compiling of my project and I've needed to reinstall it. After installing Express Editions I've tried to install Professional version. After installing MSDN I've experienced problems with my context menus in explorer — Explorer was just crashing after right mouse click. Of course may be not MSDN was a source of problem, but all in all I was needed to Recover my system. And what is more Professional stopped in the end and even refused to perform command to abort installation. After that I've recovered my system to morning state.

What is more bad, that now Visual Studio refuses to load my projects! I again trying to reinstall it... I've liked C# and .NET Framework (not in all, but in whole) and I'm wanting to program on them more, but... May be the solution is to come back from Visual Studio 2008 (all in all it is beta) to 2005. Another way is to practice on Java. The latter is better in aspect of migrating to another platforms, for example of I would want to work on Linux more that now (now it is equivalent to zero...)

Morale? I was trapped by my aptitude to use the latest versions of software... It isn't problem in many cases but not in that...

Tuesday, July 24, 2007

Writing a book

That could sound weirdly, but I started to write a book. I was writing only for one evening, so I couldn't even say if I will be writing it regularly or it's just a short-time activity. The book isn't about computers, it a fiction book in fantasy genre. I even couldn't understand about what is it. I can only say that it is about 3 friends :)

Ubuntu — first try

Recently I've tried to use Ubuntu Feisty Fawn. On virtual machine.

I've tried Linux and FreeBSD a few times before. Not very successful. Though I have to say that these attempts make my brain to think how to use, not just simply "install and use". However I wasn't able to move from familiar Windows environment to unknown *nix.

Some days ago I've decided to try Ubuntu on virtual machine. I've used two of them: VM and VirtualBox.

VirtualBox was the first. What was bad: progress bar of user interface which must be orange was instead almost invisible. But that is not serious bug. Much worse was that while installing OS on virtual HDD it failed on some step without any warning and I wasn't able to start OS from hard drive, the only choice was live-cd but that is not very good because I need to install some software on my OS to feet my purposes.

Then I've tried VM player. It hadn't got problems with progress bar and it installed successfully and now I can run it from virtual HDD. But... I couldn't find how to switch my audio card to OS (that was rather easy on VirtualBox) and, what is much more worse, it had problems with Internet. Internet is too much important for me to use OS without access to it.

As a result of this faulty attempts I've putted Ubuntu on virtual machine in a long-term box and decided.... to try it on real machine. I've already wrote that I'm studying C# now, so I don't think I could leave Windows for a long time, but I could try Ubuntu as an OS for browsing Internet :) Time will show...

Thursday, July 19, 2007

Texter

I've found a good tool from Lifehacker: Texter. What does it do? It watches on input from keyboard and if it find special combination of symbols it replaces if with text snippet. For example I've setted replace MS with Microsoft. So bow I don't need to type full name but only some letters by the result is the full name not the acronym.

This application can be extremely useful in programming if your editor doesn't support code snippets (or supports them badly, or you want to share snippets between different application without some "import/export"). These can be not just simple snippets but full templates of code.

What is more Texter support bundles: groups of text replacements that can be exported and imported. So if you can share your bundles with your friends and colleagues.

And finally: Texter can perform not just text replacement but scripts: it can imitate key commands (for example Tab). This can be useful when filling some forms in which you definitely know tab order of fields.

In conclusion I think Texter is rather a good tool (it provides statistics on how much letters was replaced and how much time this saved to you).

Links:
  • Lifehacker [Site with tips and downloads for getting things done]
  • Texter [text substitution app]


Thursday, July 12, 2007

Butterflies

There is a popular story about ugly duck who became a swan. There is also a popular example of such transformations: caterpillars become butterflies. What most of us think about caterpillars? They are ugly and nasty. I hate them. Especially when they are on my fruits... :( Some caterpillars become insects which are also nasty, but some caterpillars become beautiful butterflies. Don't you think we can say the same about people? Some become "butterflies" (good people?), some become disgusting bugs (bad people?), and others, probably most of people, become other insects, for example hard-working people can be compared with bees...

What's the morale? When you look at a young person look at what she "eats": that's will be a building material for her mind and personality during period of cocoon. If she eats mostly not good building material (rudeness, abuse language, violence, and lack of culture, etc.) then we will get another "bad brick" in our society. If she fills herself with something good (mind training, some books that may be are idealistic but shape mind in a way useful for society, etc) then we will get "good brick" in society. Or not the brick but mason?..

Monday, July 09, 2007

Egnoly Text Editor

For about one year ago, I bought my first book about programming — it was "C++ How to Program" by H.M.Deitel and P.J.Deitel. I've read 4th edition and now they are preparing to publish 6th edition. I think that's rather a good book for starter, all in all I've learned much from it, in despite of that it is about C++ — not very easy language. For that year I've learned basics of Python, Perl, Java, Ada, C#, Visual Basic and in university I've studied Turbo Pascal for one year. All of I've programmed were console applications. The only exception was working with Microsoft Access on courses were I used VB for modules, but that was not "normal" programming of GUI — all in all it is Access not Visual Studio. And after the year of programming I've changed the situation.

Now I'm working in Visual Studio on my first "normal" GUI application — text editor which I've called Egnoly. I'm writing it on C#. Yesterday I finished first version of it (0.0.1). It can open and save file. Plus built in Windows Forms TextBox class abilities of cut/copy/paste. Not very much. But it works! Moreover development GUI apps is rather unfamiliar task for me, so Egnoly hasn't any tests written and strong system of exceptions. Furthermore I don't know C# well.
To resolve the last problem I've bought Andrew Troelsen "Pro C# 2005 and the .NET 2.0 Platform, Third Edition". I think after reading it I'll be comfortable with developing GUI, e.g. modifying classes from System.Windows.Forms (as a understand that what I need to make a color syntax highlight).

So I've started my way to become a GUI wizard :) For now Egnoly is only a program to develop my programming skills from bad to "something better" :), bit what it will be in future?.. Time will show... :)

Wednesday, July 04, 2007

"Old new" pace of life

Now when I'm working there are serious changes in my daily timetable. I'm at work for about 8 hours every day and I still haven't adopted to this. Of course I want to perform some programming as usual, but after the work I now haven't got enough energy for this. Today I've read two articles in Spectrum magazine and pieces from "The Republic" of Plato. That's not very much and moreover I've realized that I don't remember almost anything from most philosophic books I'd read... :-( I think I should reread some of them...

Furthermore as I've already mentioned I want to buy a book about C# and then about UML, but I still don't decided when to buy first of them.

And I want to sleep very strong for now..

Tuesday, July 03, 2007

Choises

There are choices. They are all around us. We are making choices every day (click here). And one decision could be better that others. But why we usually choose one that's not better?

And may be we have only one choice... The choice to accept or not, that was chosen for as.

And sometimes we couldn't follow our choice.

Thursday, June 28, 2007

Plans for summer

Now second semester is over officially. I have best marks on all subjects as in first semester :). During next 2 months I think my main activity will be work. I want to buy a laptop. What is bad, is that, as I think, there is no real need in it for me. I only *want* it... But in the end of summer there will be my birthday and I want laptop as a present :). Moreover I have some other plans for summer:
  • Read some dialogues of Plato
  • Study C# (I have a choice between two books. I've already decided which I'll buy, but I think, in future I will buy also an another, because these books cover different parts of language and software development)
  • Study UML (I've also found a book about it)
  • Write Egnoly: text editor on C#. Main aim of this project for me is to to study development of Windows applications and practice in C# and in programming in whole
  • Write application with codename UP: now it's just an evaluator of arithmetical expressions. That's also a practice in programming and it is rather interesting.

Sunday, June 24, 2007

My programming

So good to have a rest from study! Now I can make what I want to do. :)

Today I worked a little with some C++ headers that will be useful in different applications so a named them ksvlib (from KoleSoV :). Moreover I'm planning to write now two applications: UP - that is something that could be a computer language in far far future and text editor. The former I write on C++ to enhance my skills in it. The latter I will write on C#. At know I almost don't know C#, but I think I could learn enough fast. I want to start this project to learn programming with GUI not on console.

I think this summer could be rather productive for me in writing software. :)

Launchy

I have a very nice desktop — I've removed all icons from it. Now it is clear and rather beautiful. Moreover I've set Start Menu of Windows to auto-hide. Because I'm needed it in very rare cases. To call applications I now use Launchy.

It's a free utility that scans through set directories and remembers all executable files and shortcuts. When you start in typing in Launchy name of application you want to start Launchy automatically suggests it and if it is right you don't need to type full name of application. Moreover Launchy remembers your choice and when you again type this part of application name Launchy suggests it firstly, so starting frequently used applications is an easy task. Although starting rarely used applications is also rather easy.

You can download Launchy from its site: http://www.launchy.net

Saturday, June 23, 2007

Yeah... Relax...

Today I've passed physics exam on best mark. I'm really pleased with that. Now there is only exam in programming, but, to be honest, I know programming enough well to be sure that there won't be any problems with it. I'm rather tired after exams so need some rest... some programming... :) and play "Battle for Wesnoth"... :)

And what is more: Google has its Summer of Code, so why I can't have my own? That not be a contest (at least at first time) and in this year there will be only me, all in all this name will be much more symbolic than the representation of real matters... But why not have some fun with names? :)

Tuesday, June 19, 2007

Where time goes?

Not very original name for the post, but that is the question I've asked myself today. On Saturday I will have an exam in physics. So I had some plans on preparing to it... but there is evening now, but I still haven't made even half of planned work! And I couldn't understand what I was doing today that the all time went out without remarkable result...

Bad! Very bad! May be I need some rest?..

Monday, June 18, 2007

Microsoft Visual Studio Codename "Orcas" Beta 1 (VS 2008)

MS have released first beta version of its Visual Studio Codename "Orcas". Officially it will be Visual Studio 2008.

For a long time I was of bad opinion about MS & its products. However while writing programs I've realized that it is not an easy work & bugs always appear & and in such a complex structures as e.g. Windows it's almost impossible to find all bugs during beta testing. So now my attitude to MS products is not so bad as it was in the past.

I've decided to try MS Visual Studio Express Edition. At first I've used VS 2005 and now I switched to VS 2008. It's my trait — I love to be on the front edge of technology, though I'm not always able. :( Of course sometimes VS crashes, but this is not common case and I haven't got significant problems with that, in spite of Safari... At first I've used Express Edition which is free, but now I've decided to try Pro version which is free while in beta. Of course after beta period will expire I would have to return to EE, but now I want to understand "What is pro version and how it differs from EE and my favourite PSPad Editor". I think it will be good to compare VS and PSPad. However, to be honest, these are products of different types: VS is an IDE, while PSPad is a text editor, which can be used as an IDE. So to make comparison richer I think it will be useful to add to it Notepad++ and may be Netbeans:I haven't got much experience with it, but little portions of work in it make me feel that it is rather good IDE.

So... It seems I've found a good source of posts for this blog: write about software I like and don't like and why. All in all, I think PSPad is worth giving him a chance. :)

Mathematics exam

Today I've passed an exam in mathematics on best mark! I'm really pleased with that, and now I have only 2 exams left and one of them is programming and I haven't got any problems with it. Another is physics. I'm not so good in it as in programming but I think there will be nothing too difficult for me.

I now haven't got much time for my own activities and paused my programming work. Moreover I'm experiencing some internal conflict: I have a lot of things I want to do, but time goes as a sand from hands without any significant result... But I think exams are legitimate reason not to be enough productive.

Wednesday, June 13, 2007

Lumosity - reclaim your brain

Brain is like muscles — to be in fit it should be trained a lot. While performing intellectual operations brain trains and one of the best things about this is that it trains in something while doing this, so the best way to learn play chess well is to play chess, the best way to learn programming is to write programs. However just performing some operation can train brain to do this operation well but to boost progress in training and learn even more techniques than just from self-studying it is important to get information from another sources, not just own experience.

In article on lifehack.org I've read about Lumosity — training program for brain. It consists of different games to train brains memory, processing speed, attention and cognitive control. I've tried it and found it very interesting to play some these games. Of course without serious study I couldn't say that my memory was improved by Lumosity, but I can say that at least I've trained in these games and now I can play much better than at the beginning. And what is more games are rather exiting, so I advice to try Lumosity while it is on beta and free.

up

I'm writing an application to evaluate numeric expressions and in future I want to expand it to perform much more complex operations, even to programming language.

0.0.1a1 - that is number of first version that was doing something. In fact it takes from standard input binary operation with integer values, calculates result and prints it.

Now i'm working on refactoring object model in this application. At first I've made a template which was a wrap to existent classes and types. But than I've understand that it will be much better to create exact classes for types, so instead of Value<> I'll have class IntType. Moreover I will soon add an ability to parse multiple binary expressions from input and (of course) print version number if there is specified flag --version. After that I plan to add parsing of expressions of any number of operands. And after that... my plans are not very clear...

Tuesday, June 12, 2007

Safari web browser

Recently Apple released beta version of it's web browser Safari. What is cool is that now it is available not only for Macs but also for PC. So I've decided to try Safari.

However my attempt wasn't successful. Browser installed normally but on many sites it doesn't show web links! Only an underlined empty place. I've experienced this in GMail and Google Reader. And that are vital web apps for me, some months ago I switched from Opera to FF only because Opera didn't work properly with some AJAX websites, for example Google Reader. Of course I can replace GMail and Reader with other apps, but does it worth the price? I think not, because Safari bugs with links are on many different sites not only Google. I've read on Digg that some people have problems with Yahoo!.

I think problems with links are connected with font rendering, because some links are shown normally, while problems are usually with bold links. And moreover I've read a blogpost about problems with font rendering on CodingHorror. And on Digg discussion there are two main lines of opinions: "Font rendering on Safari looks awesome!!" and "Font rendering on Safari looks terrible!".

So Apple tries to expand it's market in Windows apps. iTunes has been downloaded by 500 millions of Windows users. Will be Safari? Life will show. All in all it is beta version and it is made to find bugs in application, so I couldn't strongly criticise Apple for Safari that doesn't work good. And that beta shows that there are serious problems with porting of Mac look-and-feel on Windows.

Thursday, June 07, 2007

Beggining of the summer

So it's a June 7, day of the first exam in this session. So good that lecturer gave me best mark without any exam! :)

During these days I can stay at home and make a lot of different stuff. At first I need to prepare to exam in mathematics. I think after it I will have an allergy on mathematics...

Secondly I'm programming between studying mathematics. I made some progress with my app CodeExplorer which works with source code and analyses it. Though now there is nothing interesting in these app. Just some stuff from a young programmer. But now I also made an app which should work with mathematical expressions and evaluate them. Now it can only perform addition on integer numbers, but it will be much easy to add another operations. Thought adding another types of data will be much harder and what is more I'm not pleased with code that was written. I think I'll add to it common arithmetic operations, some features, write tests and then will try to refactor this awful code. At least I'll try to think of approaches of how to represent in program different data types.

Furthermore I think now I'm giving too little time to my mental study (or how it better to name?..). I haven't read any book than tech books since January! In except of some periodic reading of Confucius. I should think of that and return to this reading. At least one non-tech book must be read by me during this summer!


What is more during these summer I sometimes play in computer game called "Battle for Wesnoth". It's a free strategy game with fantasy entourage. I like it.

Sunday, May 27, 2007

Attack problems

The best way to defend is to attack — common aphorism that we often hear. But what is in it? "Those who need to be on the alert everywhere has a little strength, those who make another to be on the alert everywhere has a lot of strength". That is from Sun Tzu "The Art of War". Recently I watched another part of "Samurai Jack". Main hero ran away from big monster, who shouted at him with strong laser beam. The only thing that Jack was able to do was to run. He even hadn't chance to watch what is happening behind his back. So he couldn't fight or even defend in any way.

Of course Jack found a way to defeat his enemy. But what is in real life? Could anyone be as a main hero of cartoon film? I think no. Sometimes situation is very bad and beats come from many sides and it is even impossible to solve the situation. And the best way top solve problem is to avoid it. Or solve it in its beginning when it is weak. So the problem is a red flag to attack, to attack it. Of course that not mean that you must go forward your problem with naked sword, this can lead more damage than usual waiting for bad news.

First thing to do is to dig problem, understand and classify it. It is also useful to make a formal description of the problem. On this stage it is needed to understand with what fight will be, what will be a condition of win and even is there a necessity of fight.

After that plan to defeat problem can be created. To be formal, plan is a sequence of actions that will lead to the win condition. It is very useful to study solutions for similar problems happened in past. In general, I have to say, studying history is a good practice, that helps to prevent mistakes of predecessors.

And then comes the most interesting part: attack problem with your plan. Defeat it. Celebrate victory...

...and don't forget that problems and enemies doesn't sleep.

And don't wait when your problems will defeat you.

Monday, May 21, 2007

Black and white

There is always white and black stripes in our life. I think my black suit and shoes are the black stripes. So everything other should be white stripe. :)

Saturday, May 19, 2007

xkcd

Two pics from xkcd that I love the most.
Matrix transform
Fourier

Thursday, May 17, 2007

Accidental thoughts...

  1. Why I have a feeling that something is on the wrong place in my life?
  2. I usually live with words "I'm on the way of war" in my mind. Sometimes this phrase is shaded by others by it always back to me. Now is the time when it backs.
  3. Is there any link between first and second?
  4. "On the way of war" — I think soon I'll write a post about this.

Wednesday, May 16, 2007

Big targets and small details

On the last week I saw a part from cartoon film series "Samurai Jack". In that part main hero lost his shoes. He wanted to punish bad guys who broke his shoes but couldn't because he felt uncomfortable without his wooden sandals. He tried different contemporary shoes but he didn't felt good in them and couldn't beat enemies. After all he found a man who made him new pair pf sandals. After that hero beat his enemies.

I think there is a couple of themes to discuss that can be extracted from this film, but I want to mention only one: the importance of small details. No, I don't want to say that big picture is useless and we should concentrate on small details, but inattention to such a small piece of stuff like shoes could break any great plan!

So what to do? How to organize small routines with big plans? How to make them fit together?

As a programmer I could give only one advise: divide and conquer. What's your shoes? It's your equipment as pen, suit and computer. It's not your target activity. You pay attention to your equipment not because they exist, but because they are mean to your target. If your main target is to have pretty shoes and the most advanced computer in the world it's not very good as I think. Main target should produce something or it should be cast out. For what to do something without using it's production?

So in fact only main targets and productive activities make sense. But they are made of smaller pieces which also could be divided on parts. So then you state new task your should understand that "write new computer application" is not a something that make a computer application. It's a bundle for activities that make something, what form new a computer application. You shoes couldn't make a computer application? but they allow you to go on the street without problems and make computer application instead of healing your legs. So is with many different things in your life. That's a stuff that is made on "auto-pilot", without deep thoughts on it meaning. But if over-focus your attention on drawing "great plans" you could fail because of small detail, that you have forgotten...

Forgive my strange linguistic construction and lack of relation between phrases... Just my thoughts...

Summer is coming

Summer is coming... And session follows it... However history has been already passed for best mark — teacher gave me mark without exam on the basis of my participation in seminars. Moreover I've already finished studying English language and Engineering graphics. On physics and discrete mathematics I have only last test works to be done. So now there aren't any problems on my way to the session.

Moreover I continue to work on CodeExplorer. It's rather interesting to develop it, study new features of language and having more ideas on implementation of different solutions. I'm exited with this work!

I think "Code Complete" graved it's mark on my programming style: now I sometimes see new abilities to resolve solution or to implement it better. For example now I'm not using i, j and k as an indices of arrays. I left only them only for prototype code that will be used only once. Furthermore now I'm trying to develop my new habit: writing tests for code before writing code itself. It is called Test-driven development. It is broadly used in Extreme Programming. I think practice of TDD is useful in almost any model of iterational development process. I'm sure it will be useful for me to develop my new habit.

And one more thing... For times I was trying to arrange my time to have a schedule of making tasks. I can't say that I've reached a full success in war with time, but I'm sure that something is changing inside of my mind during my attempts to change myself...

Saturday, May 12, 2007

A lot of news...

Hello! I have a few news about me :)

Some days ago I finished reading "Code Complete". That was a fundamental reading for me. I get a lot of knowledge and wisdom from it. Of course I don't remember all interesting things I've read but I think my programming style will become better after reading. I think in future work while coming to different stages of work I'll get this book from shelf and review checkpoints for my theme, that are pointed in book. All in all I was delighted by "Code complete" and recommend it for all programmers. As for beginners to make a good basis of knowledge and form good habits, so for professionals to improve their skills.

Moreover I started to learn Java programming language. At the moment I'm on basic stages of learning: expressions, statements, etc. They almost like C/C++, so I have no significant problems.

To add more I finished developing first version of CodeExplorer. It works! Now I need to make a list of features to implement in next iteration of development. From first cycle of development I've experienced working with Python built-in PyUnit and distutils. Working with PyUnit was enough successful and in future I continue to write tests for Python software on it. "Communication" with distutils wasn't so good. However I get some knowledge and will make a functional distribution in next iteration. However now I don't understand how to include documentation for software in distribution. All in all I think my experience from this project will be much useful in future life.

In my study life session is coming... So now I pass labs and homeworks. In Engineering Graphics I have only one lab to pass. I think I'll try to make this on Tuesday. In Physics I have only last test to pass. And in programming I need to pass report on penultimate work. However now I'm finding some time not only to study but also for my computer interest. Besides working on CodeExplorer I'm studying Java and taking a breath look ob webbook about data structures. And moreover I'm planning to learn UML.

And I've decided to reread Confucius book while tripping subway.

All in all, life is good! Goodbye, until next post.
— Anthony

Tuesday, May 08, 2007

Todoist

I've discovered new very useful web-tool — Todoist. This tool helps you to organize you tasks and todos.

You can create projects and put into them tasks and subprojects. Moreover you cam embed tasks into another tasks. So you can structure your tasks as a tree withmany branches. Furthermore you can assign to task date on which it should be completed, make it everyday task and set priority. Todoist have a nice set of shortcuts to reduce amount of clicks. What is more while typying your task you type some special marks and it will tell Todoist to make something with this task. For example typed mark !p2 tell app to assign to task priority #2. Moreover there are basic facilities for formatting text.

Also Todoist have been integrated with GMail — you can delegate message to it from GMail and it will be setted as a task. Moreover developer of Todoist provides API of his webapp, so programmers can integrate Todoist into their own apps. For example into Firefox extension.

Hope this application will be usefull for you.

Links: Todoist, GMail

Wednesday, May 02, 2007

Software

Yes, I made it! Yesterday I made some progrees on CodeExplorer — sortware I'm writeing now. And I want to work more on it! However holidays finished, so there will be a problem of finding time for this. Soon I'll prepare first (not very usefull, to be honest) version of CodeExplorer.

And... Yesterday I felt myself as a normal man with life full of something interesting, not depressed one.

Monday, April 30, 2007

Google Calendar vs Scrybe

Some days ago I decided to to compare two on-line calendar utilities — Google Calendar and Scrybe. I had a question — what is better for me?

Result came very very quickly — I'm choosing Scrybe for now. And do you know what make choose it? A very simple detail — in Scrybe when you click on event you instantly has an access to it's settings and can change them. In Google Calendar when you click on event flying baloon appears, closing some of other events and suggesting you to delete event or change details. Are few more clicks but that is very important while creating a shedule with lots of entryes. I was bored by those clicks in Google Calendar. So I choose Scrybe. Althought it doesn't support russian letters.

Moreover I want to compare some other tools — Google Notebook with ThoughtPad in Scrybe. Moreover I want to understand what is better place for blogging for me — here on Blogspot or on WordPress.

Saturday, April 28, 2007

Holidays are comming!

I've get a first "finish" in my study: today I passed last laboratory work on physics. Moreover today I've made in Engeneering Graphics work 7 and pieces of work 8, the last. I also started to work on lab #5 in programming.

Now I'll have 4 holidays. I'll try to make them productive in my study: finish Engeneering Graphics works, write application for 5th lab in programming and solve task in physics. What is more, I hope I'll have time to work on my software "project" CodeExplorer, or whatever it should be called. I want to implement better organisaton in project. In near plans I'll work not on code but on documentation and will document existing elements, in despite of that not all main modules of application exist. I think not-coding work will help in future development of project.

In conclusion alittle bit about how I'm trying to organise my activity. Not always well and correct but I'm trying to write plan for next few days and follow it. These days I'm using for plannig Scrybe and Todoist.

Thursday, April 26, 2007

New tool

I've recently found new web-tool Todoist. Name speaks for itself. This tool is for tracking your todos. First view shows it is much better than similar tools I saw before. Moreover it is on some case can work as calendar. So i will try to use it actively and exlpore it and shape my opinion about it.

Morover today I spend some time working on my CodeExlporer -- some changes in architecture. As a result now I need documentation system to track those changes and organize them, bugs and ideas. Moreover I found how I can test my application with use of Python scripts. So in near plans I should make some documentation for project, roadmap, create test and after that continue to develop it. Good plan, isn't it? :-)

There is only one problem — university wants me to study and it takes a lot of my time...

Wednesday, April 25, 2007

A few words after long silence

Do you hear it? It is silence. Silence of time when I didn't wrote anything here. Now I again make some buzz in the blog.

I continue to read book "Code Complete". Good book. I get some new knowledge from there I more structured appearance of information I've already know. I think soon I'll try to use this knowledge in programming.

What is more I started to develop CodeExplorer — application to create documentation for source files. For example make description of class interface. I write it on Python, though in future may be I will rewrite it on other language.

Moreover I have in my head project of developing computer language! Optimistic idea, I have to say. Now I couldn't give time for it — still in war with arranging of time. However I try to use Scrybe.

And some piece of wisdom — just switch on your head!

Friday, April 06, 2007

In brief — lab #3

I have a little time, so will be short. Yesterday I passed lab #3 on programming. That's cool :-)) And now I get new exercise on recurse. That's not very cool :-(( You can find my lab on Picasa.

Thursday, April 05, 2007

Finding time for all you need

The result of my ideas, which I have written in last posts: don't put all perspective projects on shelf, try do do them. So I started to read new book try to make my own software project. So I need to split my time between studying, self education, reading news, implementing some software projects and of course... living an interesting life! Not an easy task, I need to properly set priorities and to find useful activities, which should be dumped.

Recently I finished work on lab #3 on programming. It was big: about 45 pages. So what will be in future labs??

Moreover I've started to read "Code complete" by Steve McConnel. Hope this book will help me improve my coding skills.

Moreover I periodically think about my own software project. There were some ideas like on-line RSS reader. However it needs from me to know how to interact with databases. So now this project is going on the shelf but I've decided to restart studying of PERL and get another attempt to learn MySQL. After I learn to use them in one system I will try to make something like RSS reader.

But now I have in mind another big project — my own programming language!!! Sounds like a buzz.... And now it is really only a buzz. But I think in next few days I will start little steps on road of developing this project. I should start with an mission, aims and roadmap. I will implement project on C++ of course. I don't have a name for the project, to be honest I don't sure I will make something interesting, so now I will call this like P1. Good codename, don't you think so? :-)

Wednesday, April 04, 2007

Another day

This is a respond to the last article: what I've done today (or yesterday in some terms :-).
  • of course had a classes in university. Moreover I've done some homework
  • read a lot of news, also from the Monday
  • bought a new book: "Code complete, Second Edition" by Steve McConnell. A heard good feedback on this book so I've decided to buy it.

Tuesday, April 03, 2007

Parallel tasking

In the last post I said that the one should do what he want now without postponing his wish to the future. But what what to do if you have a lot of wishes and passions? I.e. I want to read a lot of books. Should I read all these books simultaneously? Of course not, but putting all tasks in one queue will set me in situation, when I want something, but haven't enough time or resources to do that. So, I think, what I should do is to divide my wishes and passions into groups and form several queues. Items from one queue are performed simultaneously, while queue itself are performed in parallel mode.

Not difficult idea, it was formed long times ago... But I in someway walk through this way of organizational principles and getting them for me and trying to use them.

All in all unless you are child it's you who are shaping your mind. It's you who decide what to read, what to do, who to respond on this new knowledge, how to use it.

Saturday, March 31, 2007

What came from last week?

Good news: I passed 2nd lab on programming, created a program for 3rd lab, and now working on report for it. Another series of nights with a small amount of slumber :-(. Moreover I passed 4th lab on engineering graphics.

Furthermore I have one history for you: one of my friends reads book. Some time ago I asked her about that book, its author and content. She answered that she is only in the middle of book. After that I asked when she will finish reading. She answered that now she has a little time, so will read it during her spring holidays. So holidays came and on Wednesday I again asked about book, but she still hasn't continued to read :-(. Now scholar holidays are coming to the end, and I again will give her my question. Interestingly what will be the answer?

While we live we always have some passions and often we say that "we haven't enough time but then we will have holidays or finish some important work and will have free time to realize our passion". But time is flowing, and we still haven't enough time because some other duties are coming to us... And as a result our passion becomes a dream that will be never executed.

And now I'm publishing a diagram with some my passions. It's rather rough by now, but it may be publishing it will give me impulse to make clearer? Hope in this. The higher is branch on diagram the more it is long-term. And in the bottom you can find some short-term activities: i.e. laboratory works.

Sunday, March 25, 2007

Next big step — Programming lab #3

Now I'm working on next lab on programming. It is much harder than previous and as I think report will also be much harder to write. What is more I need to make this lab until April 5 to pretend on 5 in programming. Another series of nights without enough time to sleep... :-( Furthermore I started to log time I'm working on lab. So in the end I will now how much is time to get best mark on programming. I'm still trying to deploy core of rational organization into my processes.

Moreover I've found, that don't like Perl enough to continue to study it. I think I'll take a break on this now. May be I will return to Perl very soon, or may be not... The next I'll try to read web-book about data structures. I think it will be useful. And the next book in my list is "Code Complete" by Steve McConnel. And after that there are some books from Tannenbaum and other authors which I plan to read.

To add more, now I'm reading book about money and becoming richer and less dependent on others. To make your money grow and work for you, you should invest them in actives not passives, what most people do. What is actives? This is something, that is profitable, eg. shares, bonds, bills, real estate and intellectual property. If you invest your time and money into them, your actives and profits are growing, but if you invest in passives, grow your expenses and passives, which isn't good.

So find actives and invest you into them.

Tuesday, March 20, 2007

"Suit to change the world"

"He gave me a black box. There was a label on it: 'Suit to change the world'. I looked at him, but he was silent, so I opened the box. There was:
  • an honest heart
  • intelligence
  • steel will
  • source of energy
  • desire to make world better
  • awl to the ass :-))
'So, we give you a life. And now go there and JUST DO IT!'"

What do you think about this suit. Is it enough? May be an author forgot some important ingredients? I think it's a good topic for discussion.

Saturday, March 17, 2007

Information society

Recently I've read CNET article Lickder's vision of the Digital Age. It is about J.C.R. Licklider, who in 1960 in his essay "Man-Computer Symbiosis" predicted many trends of integration computer systems in our life. I haven't read this essay yet, but want to say some words about symbiosis between people and computers. It will be interesting to find what my opinion will be after reading essay :-)

Computers are intrinsic part of our life. Banality but true. All people in developed countries depend on computers. Computers help us to manage such important for our civilization structures as electricity, telecommunication, transportation and many others. Computers have changed the way of life in civilization, and as a result they have changed people. It is Net Generation people, who grew up in time of raising information exchange, ability to easy communicate with people all other the world, collaborate with them, constantly being online with your friends. Net Generation is much more apt to share useful information by wikis, publish thought by blogs and much more. Though most of these people prefer to communicate by Internet, not by real meeting.

Net generation, as I think, is a beginning of Information Society (IS). Information is not a hard good, it can be easily moved from one point to another and cloned for no price, etc. The one in IS is receiving tons of information, but only small bits of it are useful for him. As a result she needs to read information quickly and find there which she needs and truncate all other. What is more desired is the skill not simply truncate useless information, but if in future comes situation, where it is useful rapidly extract from the memory that you have seen something on this theme and can find it in archive.

However, you can say that that skill have been desired for all people who work with big amounts of data, even those who lived in Ancient times. And your are right. Though, my opinion is that in IS this skill plays a vital role in success. In the past you have to have great experience to make something difficult. While great experience is still highly valuable, you can find in Internet a great amount of information about your problem and what is more advices of professionals. So you can avoid many mistakes of your predecessors. Knowledge itself in IS isn't a private information available only for limited amount of people. While some information of course is kept in a secret, in general you can easily find in Internet almost all you need. And what is more, you can easily exchange your ideas and discoverings with others, taking part in growth of Database of Knowledge.

So the main point in IS will be the ability to share ideas, thought, information and other intellectual goods, providing others the ability to modify them, make them better. A group of people works better than single, but in IS you don't have search for people who will help you. They find information by themself, analyze it, use it, modify it, tell about if to others and much more...

Are you in Information Society? Are you sharing and developing your knowledge with others? If not, don't you think it's a good time to start make one more useful thing in a life, and help others by you knowledge?