Category: dev thoughts

Sometimes it’s difficult

I am a good contributor(+moderator) at www.asp.net  forums ( and I love MVC ). Sometimes it’s very difficult to stay calm . Let’s make an example:

 

[new programmer first post]

Hi I am new in ASP.NET mvc 3

I want to insert/modify collection on the page without refresh.

[ code for database first]

Now on create product View I want to add a composite in IList<Composite> Composites collection.

 

 

[My answer]

2 things here:
Modify a collection in MVC : http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx

Send via ajax : http://bit.ly/mvc_ajax_jquery

 

[new programmer answer after 4 ( FOUR!) minutes]

Hi ignatandrei

Thanks for the reply.

But I have no idea how to implement this thing.

can you give me a small example regarding this.

I have tried many times but not successed.

 

[My answer]

quoting “I have no idea how to implement this thing” from new programmer

What thing of the 2 I have shown you ?
More, I admire your fast reading if you read 2 tutorials(max 6  minutes)  so fast , download codes , reproduce and decide that you do not understand.

 

[new programmer]

Hello ignatandrei

I am sorry… The links which you have posted was not underlined/highlighted; so that’s why I thought  it were like suggentions. because of that misunderstanding I replied you back for demo application.

 

 

And then the usual combination of “ I am getting an error” – although my tutorial it handles errors – both from server side and communication side

However, when someone asks for help it is good to READ what other said – even it was suggestions…

And , as I say, sometimes it is difficult to stay calm. What have you answered?

This software is free

image

 

This is an MVC add-on to add a messaging system to any MVC application. It costs me 0$ to make this program ( not yet finished, but free source at http://messagemvc.codeplex.com/  and the related posts are at http://msprogrammer.serviciipeweb.ro/category/howto/asp-net-mvc/mvc-4/mvc-messaging-system-mvc-4-asp-net-mvc-howto/ )

Home Computer – already done for browsing the internet.

Download Visual Studio Express – free .

Download Sql Server Express – free.

Download latest bits of EF 4.2 – to work with SqlServer Compact too – free.

(Connection to internet : 25 $ – but was already done for browsing the internet)

Installing and configuring software on my PC – 0 $.

All I have done is to sit on my home desk and tapping into the keyboard. But this is does not costs , right?

Making, Planning, testing, deploying – 0$.

[quote from=http://www.petapixel.com/2012/01/10/this-photograph-is-not-free/ ]

So if you’re a magazine, website, corporation, sports team, or advertiser developer who wishes to use this photo  software , please don’t   come and ask to use it for free, or in exchange for credit or “exposure”.

[/quote]

Do not give feedback . Just rant about how bad code smells ,about how OOP and SOLID and Design Patterns are not made clear and how Testing is not properly handled. After all, it is free , right?

Sql developer versus C#(.NET ) developer

I am not very well yet from my operation – so I can not write yet a tutorial.

But I want to propose you the following difference: Sql developer versus C# developer.

In my opinion , nowadays, if you program some application , you MUST have some database. More, the retrieving of data from the dtabase is a matter of relative speed to be seen by the user. So , for me, every .NET programmer should know about indexes / schema / foreign keys / users and so on. More, it has to know about connection pooling and stored procedures.

So, in my opinion ,  you can not be a .NET programmer without knowing much about databases.

What do you think, dear reader?

( This post is generated from a discussion in that the guy says that “I’m a C# developer, not a SQL developer.” and then leaving hints like “Any organization that follows a business practice of SQL users on databases needs to fire their DBA and find someone with the knowledge and foresight of how to scale security in db roles and filter the access through the domain admins (i.e., adding users to a user group in AD).”  and then “was the primary DBA for a number of years covering SQL7-SQL 2005. “)

What do you think about the discussion ?  And about the sql developer versus .net developer?

Javascript hell

In 1997-200x days, when I have been programming in VB3-6 , there was a problem named ”DLL Hell”.

I have been hoping that, with the introduction of .NET, we will escaping this – and I have had my request answered( ok, from .NET 2 )

However, a new problem is for WebDevelopers : JavaScript Hell. Why I am telling that ? Simple :

  1. I have an application that works well in IE 8Star – and uses Json.Stringify to post data. Normally, when I was trying with IE7, it does not work – because JSON.Stringify was not allowed …Of course , solution was adding javascript from http://www.json.org/js.html .
  2. Same application use jquery 1.4 + http://knockoutjs.com/ 1.1.2 (to can modify dynamically some textboxes) + other js( a date time formatter,jquery ui and others)- . Now , in IE9 RC , jquery1.4 does  not function – and you have to use jquery1.5.1.rc also.Please tell me how to know what modifications the other js files must have( in particular knockout) .

And the mock idea is not solving the issue. You must test either manually , either with an automated test for browser(like Selenium) and testing explicitely in browser version! And I have  speak only about IE, not Firefox and /or Chrome…

If you are a developer, how many javascript do you use? If more than 2 ,welcome to javascript hell!

Star : Please read the requirements from http://msdn.microsoft.com/en-us/library/cc836459%28v=vs.85%29.aspx :

Note:

Starting with JScript 5.8, by default, the JScript scripting engine supports the language feature set as it existed in version 5.7. This is to maintain compatibility with the earlier versions of the engine. To use the complete language feature set of version 5.8, the Windows Script interface host has to invoke IActiveScriptProperty::SetProperty.

Internet Explorer 8 opts into the JScript 5.8 language features when the document mode for Internet Explorer 8 is “Internet Explorer 8 Standards” mode. For other document modes, Internet Explorer uses the version 5.7 feature set.

JScript 5.8 includes native JavaScript Object Notation (JSON) support and the accessor methods for Document Object Model (DOM) prototypes.

Programmer retrospective – 2010

What have I done in 2010 ?
1. I started this blog in English( I have one in Romanian, too)

2. I have made a book (outdated) about ASP.NET MVC 2 tips and tricks , published on Amazon .
3. I have initiated a book about programming in VS2010 – alas, it’s in Romanian at http://ronua.ro/CS/media/p/216886.aspx

4. I have learned ASP.NET MVC by answering to the questions at 1146 and I have nominated moderator on ASP.NET forums.

5. I have made a project for Azure – it is call “backup” – a project that you can deploy on Azure and have abackup for your files – like Mozy or DropBox . It is here :http://myazurebackup.codeplex.com/
(and those are other mine projects on codeplex:

AjaxForWinForms
Change Data Capture Helper
CHM2Word
Cropper.TimeCapture
IEnumerable – DataTable Exp…
PrintScreen
SqlConsolidate
UsingLib
vhd to boot entry
windows azure backup

It was a good year for me!

Hope it was for you too!

About programming – 7 points

So many times I see people saying : “I can not have time to follow the tutorials – but give me some fast acces to some tutorials that solve my problem”.

I have

  1. Programming is not about code – programming is about decisions that you do about what code to write.
  2. Programming can not be learned by one tutorial – find more , skip it the obvious and read more
  3. Programming is not an easy job to do : you must have  knowledge (about at least the language used), it takes divide et impera and many more (testing being the obvious forgotten one …)
  4. Programming is a self-continuing learning : the products that you are using change – and I am more productive today with VS 2010 (and .NET4 ) than I was with VB  3 ( although VB 3 was EXCELLENT for that times )
  5. Programming is about experience : you can learn from others , but from yours mistakes , things that worked and right things ( my least : error to not de-normalize tables…)
  6. Programming is about keeping happy your technical leader ( or, if you are the technical leader, the project manager) . And I advise you to being one if you can, to see their problems.
  7. Finally  – there is not a royal way to programming  – take your time and enjoy!

Why the posts can not be equal

There are multiple times that I have been accused of having made the posts either too heavy, either too simple , either the code is not good, either…

I have to say that :

1. You can not follow me, if you want …

2. The reason of the posts is that I want to share my experiences with another and gather feedback.

So stick with me and please help me with what project should I start

For all programmers

For all programmer, just remember :
http://timstall.dotnetdevelopersjournal.com/coding_is_just_the_tip_of_the_iceberg.htm
And he says nothing about clients, marketing, sales, promotion, SEO, SMM, and other usual stuff…