What kind of programmer you are? An analytical thinker or a VS operator

i’ve got two tasks for you. The first one is; you will connect to your working database, make a query to fetch all your contacts, and display’ em in a grid like control on a windows form. You bet it’s very simple, especially if you’re using Visual Studio. Now with Visual Studio 2008 by drag&drop operations i can do this without writing any code snippet and even have ability to display relational data.

Oh my, visual studio is really great IDE software, it makes all the things for me and now i could really dive into thinking the real problems of my software needs. But where is analytical thinking? Trying to solve the big picture puzzle of software is really an analytical thinking? I think the nature of computer programming is writing code that computers undertands and trying to solve problems by using innovational or existing algorithms. So the one who solves computional problems by algorithms is a computer programmer in a nutshell i think.

If you doubt, one main question have to be asked:

What is analytical thinking?

Here comes my second task for you that you have an array of digits those random positioned like this one:

int[] digits = new int[]{4, 5, 2, 7, 9, 3, 1, 8, 6};

So please give a try to sort this array ascending like this one {1, 2, 3, 4, 5, 6, 7, 8, 9 } without using Array.Sort() or any library method. This sounds very simple, is it? i can hear your laugh, saying how an easy thing this is. If you give a chance yourself to solve this problem i guess and suppose that you will find how much an analytical thinker you are.

cards being sort*

Here i do not advocate that not to use visual studio or framework libraries, certainly they make our life more easier, but all programmers who says that i’m a programmer and have ability to solve any kind of problems by using my favorite programming language, must do training and exercise in basic algorithms, learn historical solutions to generic problematic issues and have a look at some framework base classes how things done.

I’m neither a perfect programmer nor a expert analytical thinker, but i’m trying to do and always give myself some time to understand some basic and base concepts. I guess and believe these will make me soon a good big picture puzzler, a senior developer or solution developer.

kick it on DotNetKicks.com

Auto Generate Web Service Proxy With Intellisense Support

Here is my work that auto generates a web service proxy into an assembly with a BuildProvider implementation. It’s a protoype, the rest could be implemented in your own way but it is surely working as it is (i won’t develop it further). Once it is built, the c# code wrapper of web service description generated and compiled into memory (infact into an assembly in asp.net temp directory), so you can use intellisense support of Visual Studio.

It could stand as an alternative for wsdl.exe tool of .NET Framework sdk or Visual Studio’s web referencing feature.

I won’t describe the code one by one, you can watch the poor and short video below and download the project source code at the and of this post to digg in somemore. It can cause reinspirations nicely, if you catch one please let me know, i would like to help. So enjoy it!

P.S: If you have interested in SubSonic project which is exactly popular nowadays, this work inspired a bit from it.

Download Project Source Code

kick it on DotNetKicks.com

A Brief Video Showcase For My CMS Project

Finally, for a few weeks ago my company’s CMS project named ‘WebSayfam’ released locally for Turkish folks. The video below describes briefly on the fly page editing work flows (Interface language is Turkish for now).

Some of the core features of this project are:

  • On the fly page editing, by ‘remind me’ option.
  • SEO friendly URLs
  • One application, multiple domains (does not require installation per domain on the web server)
  • Enchased content module api (only implement IModule then deploy it)
  • Fully flexible template access ( can bu user defined) and multiple template mastering.
  • Template changes do not cause content lost. Only the look and feel changes.
  • Drag ‘n Drop content replacement, fully integrated AJAX content management on the fly.
  • So so so, i don’t want to advertise this product, i only share it’ features.

Behind the scenes the project is built on top of .Net Framework, Ms Sql Server, Nhibernate, Prototype Javascript framework. The core idea behind the project was that “build one application, handle hundreds of domains on the same web server” so we design software to be global on IIS. To do this task we implemented IHttpModules and IHttpHandlers to filter domains which uses CMS application and generate relevant contents with the manipulaion of HTML templates then registered them to machine level web.config file while loading required assemblies to the GAC. This approach solved our centric application model then we all pay our attention to the core development. While coding the project the most difficult part had became keeping module states inherited from IModule interface. And we get over this problem by binary serializing modules into the database and NHibernate helped us much with deserializing modules easily as it is.

Sorry for poor video, but i wish if it helps for some imagination with my brief explanations. I only wanted share our approach to this CMS application model and get feedbacks from you. Hope this helps some inspirations to you to share us.

ASP.NET Flies

There is an old Turkish saying that

The fly is small but it nauseates

There are few development flies in ASP.NET platform such this fly story. In general these issues slow down the web development processes and produce dirtiness in code and HTML output. I think interpreted server side scripts like PHP can deal this problems more clearer and cleaner way.

Fly Comic

Initial Post-Compilation Delays

If you work in small projects i doesn’t disturb so much at the begining but when your project get more enterprise with O/R mappings, logging libraries, security enviroment and web services testing your code with continues bug fixes become a real pain. Every time you compile your code it costs lots of seconds with initial execution and finally these seconds take your so valuable time. It’s a well known and common issue but it disturbs if your code has growed a lot.

Session Variables Losts

If your web project is released and used by many users, some critical and important data in session variables losts by an urgent update or bug fix in application, even when you make a change in .aspx files. This effects users experience with your application and it’s a disturbing issue too.

Postaback Design Issue

In traditional web development data transfers supplied by various form POST and url GET methods by a simple usage. They have cleaner way to sending data to server side. But when postback pattern in ASP.NET came into our life which simply combines javascript and encrypted form data states stay in hidden form inputs named viewstate, all our simple data transfer methodologies blured and became more complex. You lost in the questions such “Should i use querstrings or POST data or postback data?”. Think that you have a relational database project such an e-commerce application and you want to reference a product in Products page with a link from Orders page. If you all use postback pattern in your design, your code become more complex with a few code additions for querystring parameterizing. Probably you felt into these doubts such these problems.

On the fly Updates and Critical Bug Fixes

Suppose that it’s Sunday and you’re getting a calm day on the sofa by the televison, but suddenly you got news that your application felt down at that night and you have to get over that crash as soon as possible. You don’t have any chance or boss tolerance for any customer lost. But the real bad thing is your all source code is at work with your favourite IDE Visual Studio and you don’t have a chance to debug your application unless you get to work with office’s key. If your application was a PHP project the only thing you need is FTP keys. This is a small example, and can be produced more over on likely situations.

Web Standarts and AJAX

It’s very important point that web developers want to take control over the pure HTML input and output. With ASP.NET, it’s structure and it’s web controls always force to use us postbacks, viewstates, none sense table datas, invalid XHTML output. There is an option in web.config about XHTML conformce but it’s not enough. You will say that you can implement postbackless applications but it is again time consuming. And again if you want to use pure AJAX / JSON callbacks or use javascript frameworks like Prototype or JQuery, postback structure that forced you to use by ASP.NET doesn’t let you make things clearer and cleaner. It plays with it’s own rules like ATLAS etc.

Although all these problems for me seems small , they cause big headeches if they iterate a lot and you may get tired of coding web applications with ASP.NET like me. I really get bored of developing web applications in ASP.NET such jumping variables on postbacks one to one and binding data to that useless grids. I now hate postbacks and viewstates and i think the clearest and cleanest way for web development seems PHP with new OO features.

All around these thoughts, neither PHP nor Ror can be as powerful as dotnet platform. I will be waiting for ASP.NET MVC Framework. At least when it shiped to us we won’t have to play with postbacks, and have full control over HTML.

Sometimes I Hate Runtime Frameworks

Have you ever experienced a conversation in your programming life such this IM talk:

George: Hey Adam, i ‘ve just programmed a little funny puzzling game, do you want to play some? It’s only 50Kb.
Adam: Well great! send me a copy, of course i want to play.
George: OK! Wait a minute i’m zipping it, … , well have you got it?
Adam: Yep! But it gives an error.
George: Hımmm, i think you have to install bla bla framework v3.8. You can download it here http://www.blablaframeork.com. It only takes 20 minutes.
Adam: Ohh. Forget about it George, i’m too busy now, maybe later, right?
George: OK Adam, byee.
Adam: Byee ;)

This is a small but one big point that gets me think twice for programming under a framework platform. I’m programming for about 5-6 years without native programming languages knowledge and i always feel lameness of this. Write once, run nowhere, distrubute nowhere, deploy nowhere, only play it yourself with your coding enviroment. Think about that no one can produce a Windows Notepad replacement with programming .Net Framework or Java enviroment. Because notepad is only 68 Kb, requires nothing, and meaningfully responsive.

Assembly Language

Developing lightweight, tool like, portable mini softwares died for us framework parasites. Although t’s the funniest part of programming, we all have lack of this.

I’m looking for a day that really gets me to the boiling point, and begin to learn assembly language :P

« Previous Entries  Next Entries »
Valid XHTML 1.0 Strict Valid CSS!