Hey you programmers

Shoot the shit with other metal folk. Free discussion on any topic that doesn't suit the other forums. Avoid mentioning carpet.
Post Reply
User avatar
Meat Engine
Ancient One
Posts: 4451
Joined: 02 Feb 2010, 02:55
Contact:

Hey you programmers

Post by Meat Engine »

I was recently assigned a project in my advanced solid mechanics class to write a program that will discretize a thread of ballistic fiber into nodes connected by springs, and analyze the effect of a bullet impact on said fiber. I will also need to plot the output, but that will probably be done with Scilab or Open Office. Creating the model is relatively easy compared to writing the software. The only programming I have done is some beginner C++, stopping before the use of structs. Any familiarity I had is basically gone. Fortran has been recommended by the instructors, because of its widespread use in engineering. What I would like is a recommendation for a language, with the priority being the one with the most forgiving learning curve. I would also like a recommendation for a programming environment - Notepad doesn't exactly lend itself to checking for open arguments. This second recommendation should be free and able to run on Windows. :redneck:
User avatar
Lavabug
Metal God
Posts: 7817
Joined: 17 Apr 2009, 16:15
Location: An ocean of filth.

Re: Hey you programmers

Post by Lavabug »

Fortran might be a bit hard, but its indeed useful to learn eventually because its used so much in engineering(and physics afaik). This year I'll be taking some Python introductory course, which is supposed to be fairly easy. Its an interpreted language, meaning that for short or medium sized programs there's no need to compile your program, you can execute and test them directly from the interpreter ("IDLE"). I've been reading this introductory text, recommended by my course administrator:

<!-- m -->http://www.greenteapress.com/thinkpython/<!-- m -->
User avatar
vO)))id
Metal God
Posts: 12253
Joined: 13 Apr 2009, 14:44

Re: Hey you programmers

Post by vO)))id »

One can do cool thingies with C++
User avatar
Meat Engine
Ancient One
Posts: 4451
Joined: 02 Feb 2010, 02:55
Contact:

Re: Hey you programmers

Post by Meat Engine »

Having forgotten most of what I learned except a bit of syntax, I'd rather start fresh. I'll probably sack up and try to learn Fortran.
User avatar
Hugo.
Metal God
Posts: 15495
Joined: 17 Apr 2009, 10:05
Location: Ireland

Re: Hey you programmers

Post by Hugo. »

I'd be careful of fortran. Sounds like 4chan.
Image
User avatar
djonni greazo
Ancient One
Posts: 2752
Joined: 14 Apr 2009, 00:18
Location: NWO
Contact:

Re: Hey you programmers

Post by djonni greazo »

go with C. it's quite powerful and relatively easy to learn (but not easy to master.. but once you do, you'll have an easy time switching to any other non-OOL). don't go with c++ 'cause it's probably the hardest language to learn to use properly. saw some fortran use at the uni, but it was mostly old professors that started programming 20-30 years ago. it's not even taught anymore around here (not that it would be hard once you master something like C or C++), and, iirc, C performed a bit better in some tests we did in some algorithm analysis class a couple of years back (i'll post the results if i find them).



as for a good IDE, definitely try to get the latest Visual Studio (if your uni is in the MSDNAA program, you can get it for free), and of the free ones CodeLite is really good, codeblocks is supposedly good enough (i never used it, but some professors insisted on installing it on every uni pc this year 'cause they said it's much better than our previous free c/c++ ide: devcpp), Eclipse looked quite flexible for the little time i used it to code some java, and DevCpp is good enough if you want something easy and light
:xx: Image :xx:
User avatar
Meat Engine
Ancient One
Posts: 4451
Joined: 02 Feb 2010, 02:55
Contact:

Re: Hey you programmers

Post by Meat Engine »

Fortran is really, really old, but it persists. My class is taught by two researchers in the private sector, and both have said that if they get code from a client or colleague, it comes in Fortran. :mindbottling:::::::::
User avatar
Mr. P
Ancient One
Posts: 4211
Joined: 16 Apr 2009, 16:25

Re: Hey you programmers

Post by Mr. P »

[quote name="djonni greazo"]go with C. it's quite powerful and relatively easy to learn (but not easy to master.. but once you do, you'll have an easy time switching to any other non-OOL). don't go with c++ 'cause it's probably the hardest language to learn to use properly. saw some fortran use at the uni, but it was mostly old professors that started programming 20-30 years ago. it's not even taught anymore around here (not that it would be hard once you master something like C or C++), and, iirc, C performed a bit better in some tests we did in some algorithm analysis class a couple of years back (i'll post the results if i find them).



as for a good IDE, definitely try to get the latest Visual Studio (if your uni is in the MSDNAA program, you can get it for free), and of the free ones CodeLite is really good, codeblocks is supposedly good enough (i never used it, but some professors insisted on installing it on every uni pc this year 'cause they said it's much better than our previous free c/c++ ide: devcpp), Eclipse looked quite flexible for the little time i used it to code some java, and DevCpp is good enough if you want something easy and light[/quote]



I started out in University with C and yes it was quite easy to comprihend. But then starting my second semester with Java the hardest part was to adapt the difference between an object and an method. That took quite a while but after that it was a straight motorway :grimb:
:xx:
User avatar
Lavabug
Metal God
Posts: 7817
Joined: 17 Apr 2009, 16:15
Location: An ocean of filth.

Re: Hey you programmers

Post by Lavabug »

[quote name="The Fu Monster"]Fortran is really, really old, but it persists. My class is taught by two researchers in the private sector, and both have said that if they get code from a client or colleague, it comes in Fortran. :mindbottling:::::::::[/quote]

I'd suggest going with Fortran for this reason alone. You'll probably face more courses that require programming in said language, its better tailored for what you're going to use it for, so its better to get some experience in it. Its still used in high level scientific computing too, despite being half a century old.
User avatar
Victor Frankenstein
Member
Posts: 101
Joined: 10 Sep 2010, 15:42

Re: Hey you programmers

Post by Victor Frankenstein »

Translating physical model (list of equations for spring behaviour) might not be so easy for the beginner programmer regardless of language. How about Mathematica? It has nice abstraction layer for dealing with tons of calculations, and I'm sure, for this task you could solve it in about a week or two. Because - solving this king of project in C/C++ will require learning alot of numerical algorithms (it's easy to derive a function by hand, but in C it can be a mess, if you never did it before), and it could be too much for a low level language. OTOH, Python is too slow for this.
"Friends, this is clean-up time and we're discounting all our silent, electric Ubiks by this much money. Yes, we're throwing away the blue-book. And remember: every Ubik on our lot has been used only as directed."
Post Reply