Sunday, December 26, 2010

ycombinator and things I read




Recently a friend of mine send me a link to ycombinator - great resource for someone like me. So, if you like to read things that are more pragmatic then going deep but stay focused on one technology, methodology or technic, then this is something like /. but more techie. Simply I love it, usually, really short articles behind, on various subjects. Some time ago I spend tremendous amount of time looking for some good resources of techie knowledge, and so far /. is the only thing I am using on daily basis, but ycombinator seems to be great as well.

In terms of books, recently I read:
Knuth's The Art Of Programming (first 3 tomes)
Avodey's Category Theory (Oxford Logic Guides)

I enjoy reading few books at this same time (well, almost this same). When a part of book, or some topic is not really interesting, I switch to second book, and give my brain a fresh topic.

In terms of Knuth's books, I enjoy the way how they are written, easy to read, with sense of humor. Excellent exercises at the end of each topic. I don't like the MIX language. It is too old fashion to me. Sometimes, dealing with the language is harder then the algorithm itself, and a problem is more about how to write the code well (or even, how to write it), and not how to deeply understand, why some operations take place, and why they are done now, and that way. But still I recommend this book.

I spend some time deciding between Category Theory (Oxford) and Basic Category Theory for Computer Scientists (MIT). The O book is newer and bigger than M book, but also more expensive. I made a decision, base on fact that I am more Oxford then MIT boy (sorry chaps:)). So far I love it, easy to understand, lot's of new stuff to learn. I don't see to many exercises that are good for me, and It makes it hard to test new knowledge.

Sunday, December 19, 2010

Enabling grep in windows emacs installation




New windows, means new emacs and firefox configuration.

First step is to install dired plus, so it would be easy to search using grep directly from dired.

To enable grep in windows installation of emacs one needs to install grep, it is a good idea to install also find utilities. I tend to change the find.exe file name to efind, because windows already defines find utility. Then add bin directory to windows path. And copy following libraries:

libiconv2.dll
libintl3.dll
pcre3.dll
regex2.dll


to emacs installation bin directory:

%EMACS_HOME%\emacs\bin


In addition in my last post I forgot to add following line in .emacs

(setq make-backup-files nil)


In terms of Firefox some additional plugins, that I tend to use recently:

Tamper data
Statusbar
Visual Event

Haskell Platform





Long, long time ago, when I started to learn haskell I spend many days trying to choose between ghc and hugs. Some people used ghc and other hugs, and there was no right choice. The problem for me was pretty big, because I come to haskell from the world of scheme, and in scheme sooner or later one finds out that there are 'some' differences between implementations, and later on when you want to use some public library you need to switch to other implementation, and code that you already have is not 100% compatible with it. And some migration errors are really hard to find. For example if an element of a code is not used usually, but will fire up when some weird criteria are met. Sad thing, isnt it?

Today, I created a new Windows box, and I needed an haskell environment. I tend to write my haskell code in Emacs (OurComments.org edition), and I love it, but today I went to haskell.org, and I was surprised to see that there are dramatical changes in the contend of this site (I don't use this site at all). And finally somebody have written some cool looking haskell tutorial. I love the look and feel of it (guys, great job there). Also I was surprised to see that they are promoting a Haskell Platform. Witch is an environment and set of tools on top of ghc. I gave it a shot, and so far so good. Good to see that the haskell is still improving. Let's keep it that way:)

Sunday, October 10, 2010

Types in c#

I hate to forget about links that I love to read. From time to time I forget about how it goes. Here are two great articles and links to nice blogs to read.

Types in C#.

Monday, August 30, 2010

Iesi.Collections




I haven't used this library for a long time. It's been so long, that I forgotten it's name:) I hate it when I want to use something, I know that I used it before and that this is a place to use it, but I don't remember what was it called. So I post about it to know where to find it next time, when I need it:)

Iesi.Collections fills a gap in the Sytems Collection by providing a set collection. This collection comes in handy when an array or list are insufficient either because you need to add and remove elements often (tedious in an array) and duplicates are undesirable.

Tuesday, August 17, 2010

My .emacs base




Each time when I move to next machine I install GNU Emacs on it. For the last 8 years it's been the best development tool (and much more), that I've seen. The problem is that each time when I set up a new machine I have to start writing .emacs file from scraches. Ofcourse I download from my gmail account some examples that I've used in my previous machines, but I fought that it would be nicer to get it from a blog, then search throu entire mail. Here is my .emacs base:


(global-font-lock-mode 1)
(show-paren-mode 1)
(setq dired-recursive-deletes 'always)

(global-set-key [f8] '(lambda () (interactive) (find-file "c:/.emacs")))

(add-to-list 'load-path "c:/worek/emacsPlugins/color-theme-6.6.0")
(add-to-list 'load-path "c:/worek/emacsPlugins/pink-bliss")

;color-theme
(require 'color-theme)
(color-theme-initialize)

;pink-bliss
(require 'pink-bliss)
(pink-bliss)

(defun load-dot-emacs ()
"load dot emacs"
(interactive)
(load-file "c:/.emacs"))

(defun dot-emacs ()
"find file .emacs"
(interactive)
(find-file "c:/.emacs"))

Monday, August 16, 2010

The Validation Application Block




Recently I've been refactoring some monolithic project. I'm trying to make it more modular, easier to manage. I'm dividing code into smaller projects base on business logic (parts of code that can be made module base on some autonomous functionality, and are not really strongly connected to the application base) and based on architectural modules - like separate project for a database layer, separate for managers... one of those smaller projects are validators. There are so many different ways of validating input in the application. It's shocking, each time somebody inputs a date into the system, it is validated in a different way, not to mention that there is no such a thing like a common date format, or error message format. This is where 'Validators' module kicks in, it is supposed to be the only place that is responsible for keeping some regular expressions, configurations, validation methods that are related with validation and are not included in a base (in my case that do not exist in a System.ComponentModel.DataAnnotations). I really enjoy the idea of validating input by using annotations. My research on different annotation based validation frameworks lead me to Validation Application Block.

As for me it gives more possibilities available out of the box to validate input then DataAnnotations, but it doesn't integrate MVC validation framework. I had to write adapters in order to connect both frameworks.

If you haven't seen it, give it a shot.