Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 3rd, 2007, 11:43 AM   #21
BinarySurfer
Programmer
 
BinarySurfer's Avatar
 
Join Date: Dec 2006
Posts: 53
Rep Power: 0 BinarySurfer is an unknown quantity at this point
Quote:
Originally Posted by commodore View Post
What does "mutually exclusive" mean?

I don't mind taking money for programming but money shouldn't be the goal itself when programming.
I'm not sure if you realize that many programmers program for a living, therefore, they care about the money. Programming is about businesses and the consumers, not personal pleasure unless you're living off someone else dime. I'm not a Scrooge, but the money is important to me and if you think it's not, you need to wake up from the fantasy land where things are free and easy.
BinarySurfer is offline   Reply With Quote
Old Jan 3rd, 2007, 12:52 PM   #22
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 439
Rep Power: 5 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
It is possible to enjoy coding as a hobby and still have a totally different means to support yourself and/or a family. I will agree that most who code either do it for a living or plan to when they finish school/get out of Momma's house, though.
__________________
Amateurs built the ark
Professionals built the Titanic

peace_of_mind is offline   Reply With Quote
Old Jan 3rd, 2007, 1:59 PM   #23
milot
Programmer
 
milot's Avatar
 
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0 milot is on a distinguished road
Of course there are times when we program for fun and just for the curiosity to see how things are working, whats the difference of two, three or more programming languages but this we will do when we are still students, or we have a serious job and we program just for fun because we have a source where the money comes, but wen you take programming as primary you must figure out making your own business with that and earn money from that what you do and get off the fantasies of movies, of course if you do programming for fun, why not earning some money then?

We are discussing here although we are off topic but is kinda related because this is why most people use .NET Technologies because its very fast in business because a manager cannot wait for us writing MFC or wxWidgets and dealing with the location and size of a button until they make it exactly where they want, because in real world we will work with strict deadlines and we must be precise in our work. Of course we can write an interface in C# or VB we also can write buttons but we waste time while making this.

I like the quote "KISS" that means "Keep It Short and Simple".
milot is offline   Reply With Quote
Old Jan 3rd, 2007, 2:31 PM   #24
BinarySurfer
Programmer
 
BinarySurfer's Avatar
 
Join Date: Dec 2006
Posts: 53
Rep Power: 0 BinarySurfer is an unknown quantity at this point
Right, but your statements still point to money at the end. I didn't exclude those that do it for a hobby, or whatever, because I said "many programmers".
When we keep it short and simple, the old saying of "there's no shortcut" comes into play. Efficiency and system performance is sacrificed to meet the KISS in applications like VB.NET. Although coumputers are becoming better and faster, what would happen if several poor KISS programs are running? What would happen if that became a standard? How well would computers be running then? Although this is exaggerated, you cannot deny it could be a possibility.
BinarySurfer is offline   Reply With Quote
Old Jan 3rd, 2007, 3:00 PM   #25
milot
Programmer
 
milot's Avatar
 
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0 milot is on a distinguished road
For that reason we have a GC (the Garbage Collector) which helps us improving our performance cleaning unneeded objects from memory and makes our life easier to not deal with deallocation and managing memory manually, but sometimes KISS doesn't work and `there is no shortcut` works but we must fit in life's high and ebb tide. Of course my statements are still pointing to money because I must work for living, and I fully agree with you in previous post.
milot is offline   Reply With Quote
Old Jan 3rd, 2007, 3:06 PM   #26
commodore
Programmer
 
Join Date: Nov 2005
Location: Estonia
Posts: 97
Rep Power: 0 commodore is an unknown quantity at this point
KISS and RAD? Doesn't go together well IMO because often when something is simple to use it's not simple in structure. I think it's the same with programming languages.
commodore is offline   Reply With Quote
Old Jan 3rd, 2007, 3:30 PM   #27
Tim
Unverified User
 
Join Date: Dec 2006
Location: Bristol UK
Posts: 19
Rep Power: 0 Tim is on a distinguished road
Just to point out some other things a lecturer once told me about GC's that I found to be interesting.

A GC does not always mean that an application will complete its task in a greater time than using manual memory management.

When you manage your own memory you have to essentially call malloc and free or new and delete. These operations have quite a bit of overhead, especially malloc and new. Apparently allocation of memory on a managed heap can be considerably quicker than on a conventional heap. I am not sure the reason for this though. This means that it could be faster to new up an object in C# than it is in C++.

When the GC decides its time to collect it is not necessary a lot slower than doing manual frees or deletes. There are various types of GC's. They type used in the JVM and .net is a Generational GC, which is quite complex and is a relatively slow type of GC. This all means that the combined time for memory allocation and deallocation in .net or the JVM is probably similar to conventional memory management.

So put simply the time for a malloc + a free is roughly equal to the time for a C# new and a .net GC sweep for an object.

The advantage is that you should never be able to have a memory leak which is a major plus. The only major issue is the non determinate nature of a GC. You just cant tell when it will run. If it runs as a user interacts with a GUI for instance it can seam that the program is very slow. But if you look at the whole program running as a whole there should be no major performance drawbacks to a GC.

On the KISS and RAD argument, I think that RAD tools make development much easier and faster. In the .net world the level of abstraction is raised so that complex programs can be written in a much simpler way. A simple example is a simple GUI app. In C you need to have quite a bit of code just to set of a window and a few controls. Then you have the message loop and event handlers to write. This is simple to do if you understand it but it is a waste of time. In .net all you need is a class that inherits Form and then you have a window. Events are handled by delegates which are incredibly simple to use. It is IMO simpler to understand a C# GUI app than a C GUI app using Win32. As a programmer I do not care how .net sets up the GUI and the underlying system to make my window and controls, as long as makes me more productive. So in this case KISS and RAD to go together.
Tim is offline   Reply With Quote
Old Jan 3rd, 2007, 3:49 PM   #28
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
GCs can be faster, but it comes at a cost of less memory efficiency. Deallocing a section of memory takes the same time whether you're doing it manually or automatically. At the end of the day calling free takes the same time whether your program is calling it, or whether a GC is calling it.

But a GC can delay freeing memory until a time when the processor is idle, or until it has a big chunk of memory which it can free all in one go. A GC could even free memory before it goes out of scope, as long as it knows that that memory won't be referred to again. It could also try to anticipate your memory usage, perhaps keeping a little on the side just in case you need it.

Generally speaking, a good GC trades memory for CPU. Sometimes this is a good thing; having something run 5% faster at the cost of 5% extra RAM may be worth it. At other times, it may not be. Also, no GC can make a perfect trade-off all of the time, so if you're unlucky you may find yourself with more memory and more processing time.

Also, KISS should really be KIASAPS - Keep It As Simple As Possible, Stupid.
Arevos is offline   Reply With Quote
Old Jan 3rd, 2007, 4:40 PM   #29
BinarySurfer
Programmer
 
BinarySurfer's Avatar
 
Join Date: Dec 2006
Posts: 53
Rep Power: 0 BinarySurfer is an unknown quantity at this point
I was simply saying that VB is more simple, but not efficient. For example, the GUI takes 150+ lines of code when the same can be made shorter in other languages like Python and Java. My previous entry may have confused you, arevos (if your last statement was aimed towards me), I was not aiming at complexity of code, but choosing an easy route in developing programs that harms performance. It could also be my dislike for VB.NET speaking through me.
BinarySurfer is offline   Reply With Quote
Old Jan 3rd, 2007, 5:03 PM   #30
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
I was largely just clarifying what is usually meant by KISS. When people talk about KISS, they usually mean KIASAPS, not KISSIDW (Keep It So Simple It Doesn't Work).

As for the simple vs. efficient observation you make (or perhaps more accurately, program efficiency vs. programmer efficiency), I quite agree with you. Sometimes it's worth designing programs in a less efficient environment if you gain a more expressive environment. Any programmer worth their source code should know that.
Arevos is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:30 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC