The Grey Labyrinth is a collection of puzzles, riddles, mind games, paradoxes and other intellectually challenging diversions. Related topics: puzzle games, logic puzzles, lateral thinking puzzles, philosophy, mind benders, brain teasers, word problems, conundrums, 3d puzzles, spatial reasoning, intelligence tests, mathematical diversions, paradoxes, physics problems, reasoning, math, science.

   
The Grey Labyrinth Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The hated computer programming question
Goto page Previous  1, 2
 
Reply to topic    The Grey Labyrinth Forum Index -> Off-Topic
View previous topic :: View next topic  
Author Message
Jack_Ian
Big Endian



PostPosted: Thu Jan 13, 2011 2:16 am    Post subject: 41 Reply with quote

I'm with you on that Zag. Especially since C is case-sensitive.
I sometime can even remember the exact names of variables that I just defined seconds before. Felicitous
Having it suggested by the editor after typing just a few characters is exactly what I need, and in no way interferes with the overall programming. And if your code is automatically beautified and brackets appear automagically as you type then so much the better.
Back to top
View user's profile Send private message
wordcross

<memstat>



PostPosted: Thu Jan 13, 2011 2:31 am    Post subject: 42 Reply with quote

I've no problem with suggesting that someone with experience focus on the function of a program rather than the syntax. However, for someone just beginning to learn programming it's dangerous to leave their syntax up to the development environment. It's like telling someone who's learning to write essays that Spell Check and Grammar Check are good enough as long as you focus on content. It might work most of the time, but it becomes much harder to explain good practice when they've been relying on a shortcut all the time.
_________________
Has anyone really been far even as decided to use even go want to do look more like?
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Chaz
Vote: Zag



PostPosted: Thu Jan 13, 2011 3:20 am    Post subject: 43 Reply with quote

Again, it really depends on "why" he wants to do this.

For the biggest challenge, C++ using notepad.exe and flat files (or db2 files) is the way to go.

If he wants the "easiest" version of programming, then Google Docs is the most logical.

If he wants to join in the experience of community programming, php is the best answer.

If he wants a scripting language that seems to be "magic" then perl is his answer.

The reason so many people "won't" answer the question of "which is the best programming language" is because there isn't a "right" answer; it just depends.

At my job, I use PHP (via Notepad++) with a mixture of mySQL and MSSQL databases. I also use Visual Studio for intranet applications.

For my websites, I use PHP and mySQL.

For scripting things (like ftp feeds to third parties) I use perl.

For quick and dirty Windows API functions (like showing what groups a user belongs to) I use VBScript.

It just depends on what you want to do, why you want to do it, how pretty you want it to look, and how easily you want want to build and manipulate the application.

----------------------------------------
On a side note, store the ingredients by weight, and buy your wife a scale that can re-zero. It's the way of the future... but... if she's serious about cooking, she probably already knows that. *nudge*
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chuck
Daedalian Member



PostPosted: Thu Jan 13, 2011 3:58 am    Post subject: 44 Reply with quote

So the assembly language idea is rejected?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Chaz
Vote: Zag



PostPosted: Thu Jan 13, 2011 4:08 am    Post subject: 45 Reply with quote

Eventually, everything uses machine code. Might as well learn them.
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Antrax
ESL Student



PostPosted: Thu Jan 13, 2011 7:18 am    Post subject: 46 Reply with quote

Chaz wrote:
Antrax's suggestion of C++ and SQL
I never suggested either. I don't think C++ is a good first language - in fact I think it's one of the worst. C++ is for expert C programmers wanting to write object-oriented code.
My suggestion was actually Java, which nobody paid any heed to Melancholy
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zag
Tired of his old title



PostPosted: Thu Jan 13, 2011 1:39 pm    Post subject: 47 Reply with quote

Chuck wrote:
So the assembly language idea is rejected?

Yes. The equivalent would be if someone, wanting to learn basic carpentry, planned to build a doghouse, so you give him an axe, a saw, and a hand drill, then point into the forest and say, "there's your wood source."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Antrax
ESL Student



PostPosted: Thu Jan 13, 2011 1:55 pm    Post subject: 48 Reply with quote

I don't think Chuck was being serious.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zag
Tired of his old title



PostPosted: Thu Jan 13, 2011 1:59 pm    Post subject: 49 Reply with quote

I suspected as much, but then there is Chaz.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Chaz
Vote: Zag



PostPosted: Thu Jan 13, 2011 2:03 pm    Post subject: 50 Reply with quote

Oh. Sorry Ant. I don't know who said C++ with SQL. It was great advice though (if he wants to resell his skills later on.)

The problem with Java is that it runs so slow and buggy on windows machines (at least in my experience), and it's prone to needing the "correct" version of java installed (as opposed to the latest.)

Though I'm certain this is limitations of programmers (both those who wrote java for windows, and those who wrote the java apps themselves.)

Though.... Android Phones use java apps, so there is an argument for learning it just for that aspect...
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zag
Tired of his old title



PostPosted: Thu Jan 13, 2011 2:09 pm    Post subject: 51 Reply with quote

Wow! What 90's era Windows machines have you been using? Java is neither slow, nor buggy, and hasn't been for about a decade.

A quick search on monster.com for jobs with Java as a keyword beats jobs with C++ as a keyword by 2-to-1


Last edited by Zag on Thu Jan 13, 2011 2:13 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Lepton*
Guest



PostPosted: Thu Jan 13, 2011 2:11 pm    Post subject: 52 Reply with quote

I forgot to mention QBASIC. Great place to start, although the "command prompt" is probably too alien these days for it to seem like real programing. QBASIC is cool because it's a pretty simple language (BASIC) combined with some easily-used graphics and sound, without a need for external libraries or anything like that. It was the OS X of programing environments/compilers/etc: simple, powerful enough for learning, and it just works.

My dream: a web browser ("web browser") that does for PHP what QBASIC did for BASIC. Imagine what we could create if someone as unskilled as I could program and micro-host PHP sites and services from within Firefox or Opera.
Back to top
Chaz
Vote: Zag



PostPosted: Thu Jan 13, 2011 2:12 pm    Post subject: 53 Reply with quote

Viruses everywhere. Razz

I mean that Java is slow compared to (for example) C++. Of course... compared to C++ everything is slow.
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Johny Fake
Daedalian Member



PostPosted: Thu Jan 13, 2011 3:21 pm    Post subject: 54 Reply with quote

Wow, lot of great stuff to read this morning. After sleeping on it, I've decided to go the assembly language route. (I don't want other programmers to think less of me!) I've already said goodbye to my family, and taken a leave of absence from work. I wish you all the best, and now I must go, as I am trying to wrap this up before 2030.

I downloaded Visual Studio Express last night, and it includes a nice video tutorial. I was a bit disconcerted after reading the opening screen, which states "for evaluation purposes only". I don't know what that is implying.

Zag offered a good demonstration of the things I want to learn how to figure out. The ingredient issue is a great example that I have thought about. So far I want to go with several fields (quantity, unit of measurement, item, and perhaps a comments field). I am even envisioning several groups of drop down fields (fruit, dairy, veg...) that can be used, with the option for my wife to add new entries to each (this might eliminate any typo issues...or make it unwieldy).

I will definitely need to learn syntax, but I think that can wait until the second version when I move over to PHP for a web version, or decide to write a new app all together. I don't want to make this initial journey too arduous...but it will lack the feeling of accomplishment I am seeking if it is too easy.

The primary reason I wanted all your help, was to make sure I didn't make a wrong choice. From your responses, it appears there are several right ones. VB, JAVA, Googledoc (haven't studied this one yet), PHP, etc. When I began, I picked PERL, which appears to be wrong for this. I will move forward with VB, unless anyone sees a disaster that awaits. I am steering clear of C++, as it sounds too difficult, and not using Access (too easy, missing the primary point).

I have always wanted to relearn programming. It's like being a carpenter with unlimited building materials, being able to construct something that can be used by everyone (as opposed to just one). I'm sure several hours/days/weeks of work will make me regret this desire and re-consider my analogy.
Back to top
View user's profile Send private message
Zag
Tired of his old title



PostPosted: Thu Jan 13, 2011 5:17 pm    Post subject: 55 Reply with quote

Johny Fake wrote:
Wow, lot of great stuff to read this morning. After sleeping on it, I've decided to go the assembly language route. (I don't want other programmers to think less of me!)

No, really. Don't do that. No one will think less of you if you use tools created more recently than 1980. The problem with that approach is that you'll be a week into it before you really even get started, just figuring out how to interact with a user.

I was serious about my analogy -- cutting down trees really does not help you learn how to do carpentry. It is true that a visceral understanding of the process of making trees into what you buy at a lumber yard would ultimately be valuable to a professional woodworker. However, there's no need to start there. Learn how to build a basic structure, first. In any case, if you think C++ sounds too hard, assembly language is an order of magnitude harder.

If you want to learn assembly language, then your recipe project is not the right choice. Way back when I used to program in assembly language, I had a friend (a hardware guy at the place I worked) who had a project for which his primary purpose was to teach himself assembly language. His project was to make an electronic combination lock, and he actually planned to install it in his car. (This was in 1981, when such a thing was not available.) He had put together the hardware, with a 4004 microprocessor, a 12-button keypad, a battery, and a solenoid. THAT would be an appropriate project to do in assembly language, teaching you how to make a timing loop, to access basic binary I/O, to debounce switches, etc.

Your project is about making a basic user interface on a screen, loading and saving data, and manipulating it. You want a language for which the details of putting words on a screen are basically built-in.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
JF*
Guest



PostPosted: Thu Jan 13, 2011 5:48 pm    Post subject: 56 Reply with quote

Zag,

I was about as serious as Chuck.

But, do you think the VB route is appropriate?

I wrote my first programs this morning, even had my first bug!
Back to top
JF*
Guest



PostPosted: Thu Jan 13, 2011 5:50 pm    Post subject: 57 Reply with quote

Zag wrote:
I had a friend (a hardware guy at the place I worked) who had a project for which his primary purpose was to teach himself assembly language. His project was to make an electronic combination lock, and he actually planned to install it in his car. (This was in 1981, when such a thing was not available.) He had put together the hardware, with a 4004 microprocessor, a 12-button keypad, a battery, and a solenoid. THAT would be an appropriate project to do in assembly language, teaching you how to make a timing loop, to access basic binary I/O, to debounce switches, etc.


That guy is awesome.
Back to top
Antrax
ESL Student



PostPosted: Thu Jan 13, 2011 7:04 pm    Post subject: 58 Reply with quote

Wow Zag, I knew you were a high level guy, but don't be dissing the assembly. It's useful, and for some purposes it's irreplaceable. To say that it expired in the 80s is really inaccurate.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chaz
Vote: Zag



PostPosted: Thu Jan 13, 2011 9:00 pm    Post subject: 59 Reply with quote

JF should write a PHP site with an API that can interface with VB.

On a more serious note... google docs has a great API.
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
wordcross

<memstat>



PostPosted: Thu Jan 13, 2011 10:21 pm    Post subject: 60 Reply with quote

Ok for real we need to get a like button for the GL. Someone take a look a the FB API and implement it on the PHP BB interface.
_________________
Has anyone really been far even as decided to use even go want to do look more like?
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Zag
Tired of his old title



PostPosted: Thu Jan 13, 2011 10:26 pm    Post subject: 61 Reply with quote

I didn't say that the need for assembly language went away in the 80's, just that the tools for developing in it haven't significantly changed since then, because there is no need for them to.

In any case, I really can't imagine writing anything in assembly language directly. If I had to do any real-time coding (again), I'd be doing it in C at the lowest, with maybe a very few spots where I use the #asm directive. You really can't write assembly code any more efficient than what an optimizing C compiler will create, I'll bet. And if you can't predict, with an incredibly high degree of accuracy, the assembly code that your C code will compile into, then you aren't a real C expert. I can even do this with C++ (or could, back in the day), including virtual function tables, etc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
The Ragin' South Asian
Head Poncho



PostPosted: Thu Jan 13, 2011 10:28 pm    Post subject: 62 Reply with quote

wordcross wrote:
Ok for real we need to get a like button for the GL. Someone take a look a the FB API and implement it on the PHP BB interface.
Someone hasn't switched to the new GL yet
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Antrax
ESL Student



PostPosted: Fri Jan 14, 2011 6:39 am    Post subject: 63 Reply with quote

Quote:
You really can't write assembly code any more efficient than what an optimizing C compiler will create, I'll bet.
You'd lose that bet. Remember, I work for Intel. I had a friend whose job was to find C code that optimizes into bad assembly so we can tell the compiler guys to fix it Felicitous
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jack_Ian
Big Endian



PostPosted: Fri Jan 14, 2011 9:44 am    Post subject: 64 Reply with quote

I would have been 100% on your side 10 years ago Antrax, but the world of microprocessors is a much different animal now, especially when code is optimised for a particular processor.
Unless the task is "small" or tightly looped, I would suspect that human-produced code would be less efficient. Although perhaps my opinion is biased, given the appalling quality of assembly code I've witnessed in my time. Seriously, copy & paste should be banned from assembly language editors.
Today's optimisers do crazy stuff that makes reading the produced assembly language very difficult, and do things with the code that no programmer would do. The end result though is weird code that flows through the processor like mercury while making close to optimum use of the processor's internals.
Sure there will be locations in the code where a few clock-cycles can be shaved off by an experienced assembly programmer, but overall I think the days where assembly projects would win hands down may be gone.

There are still times where assembly is king though, and knowing about assembly can help you produce better code and give you a better idea about what is actually happening. (In much the same way that driving a motorcycle can make you a far better car-driver, you just become more aware of what is actually happening around you)

I've seen so many recently trained programmers that really have no clue about what happens when they hit the compile button or even the real difference between a compile error and a link error and they are prone to making silly errors like passing uninitialised pointers as parameters, thinking that it's enough to make sure the types match. I find their ignorance sometimes jaw-dropping. These days I don't care how they performed in College, gimme a programmer that used an EPROM in a project of theirs and gets excited talking about it. I don't care if they don't like being in a room with more that 2 people or some other weird personality trait, so long as I can hand them a project and not worry that it will fall around my ears the next time there is an OS upgrade.
Back to top
View user's profile Send private message
Zag
Tired of his old title



PostPosted: Fri Jan 14, 2011 1:52 pm    Post subject: 65 Reply with quote

What he said. Extreme Delectation

I didn't mean that you couldn't take the output of the compiler and find a few places that you could squeeze a few cycles out of it. I meant that in any significant piece of code, you can't do as well overall.

In any case, there is never any reason to worry about speed until you do testing and identify the places that matter. The speed of any modern application is hardly ever determined by the number of cycles one step takes, it is more often determined by higher-level choices, at the algorithm level. You can optimize the crap out of your bubble sort, but my poorly optimized quicksort is still going to blow it away. (I'm using this as an example, not that I think you would use a bubble sort.)

-----------

Here's a boring personal story that I will relate to you anyway. Extreme Delectation When I was a senior in high school, 1978, I had completed the one-semester computer course the previous spring and was doing an independent study on our PDP-8e with 8 whole K of memory. My instructor had written (in BASIC) a prime number program that he said was as fast as it could be; he had learned that an increment/test done manually was faster than a for loop, etc. However, he was testing every number for primeness. My program, with its inefficient for loops, just printed 2, then tested only the odd numbers. It seems obvious in hindsight, but my point is that worrying about localized optimization can put blinders on you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Antrax
ESL Student



PostPosted: Fri Jan 14, 2011 2:38 pm    Post subject: 66 Reply with quote

Quote:
I would have been 100% on your side 10 years ago Antrax, but the world of microprocessors is a much different animal now, especially when code is optimised for a particular processor.
Unless the task is "small" or tightly looped, I would suspect that human-produced code would be less efficient.
You're preaching to the choir. I mean, this is what I do: http://software.intel.com/en-us/articles/intel-opencl-sdk/
However, that doesn't change the fact that I, personally, can beat the optimizer. This isn't because I'm a good programmer, it's because this is what I do. My field is multithreaded optimization. When I optimize, I do it with tools that show me the state of the processor as it progresses through my code, and I identify problems, and I rewrite the code to solve them. That's a part of my job, it was completely my job for over a year, so yeah, I personally can beat an optimizer, despite everything you've said being 100% correct.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zag
Tired of his old title



PostPosted: Fri Jan 14, 2011 3:18 pm    Post subject: 67 Reply with quote

Point conceded, A. You da man.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
JF*
Guest



PostPosted: Fri Jan 14, 2011 3:56 pm    Post subject: 68 Reply with quote

Visual Studio is quite good for a beginner.

Side note: Two monitors is good for most jobs (including mine as a commercial real estate appraiser). It is necessary for working/playing as a programmer. This is obvious to everyone here, I know....actually, two is probably too few for most here.
Back to top
Chaz
Vote: Zag



PostPosted: Fri Jan 14, 2011 4:38 pm    Post subject: 69 Reply with quote

This is how I roll...


All the time.
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Antrax
ESL Student



PostPosted: Fri Jan 14, 2011 6:04 pm    Post subject: 70 Reply with quote

Zag wrote:
Point conceded, A. You da man.
In retrospect I probably shouldn't have brought it up because everything you and JF said is basically correct. Moreover, (in the very likely case you didn't open Wikipedia and started reading about OpenCL) one of the main points I usually bring in support of OpenCL is exactly that only a handful of experts knows how to optimize well and this it should generally be left to the compiler and OpenCL lets you do that yadda yadda. However, I'm also vain and was amused you managed to stumble on one of the few people who actually knows how to read a pipe trace (and who would want to) while making your very valid point. So yeah, sorry. I just had to brag Ecstatic Happiness
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chaz
Vote: Zag



PostPosted: Fri Jan 14, 2011 8:14 pm    Post subject: 71 Reply with quote

Definitely worth bragging about.

Also... I think you two may have left the scope of "beginner programming"...
You guys are talking over my head at this point (and that's actually saying something).
_________________
The enemy's base is down.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous: by   
Reply to topic    The Grey Labyrinth Forum Index -> Off-Topic All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Site Design by Wx3