View Full Version : Any programmers here?
Arcade Fire
13-09-2007, 15:20
For my work I quite often have to write 'quick and dirty' programs to find answers to questions that would take me too long to calculate by hand, and to which there's no existing program which does the job I need. Typically these take < 1 hour for me to write and debug, and I don't use them much after I've got the answer that I need from them.
I'm currently doing this in MATLAB, which is good in that it's easy to use, but bad in that the calculations that I need to do are getting slowly more complicated, and MATLAB is really slow. So I need to pick up another language.
I've used C before, and it seems powerful and fast, which is what I require. Before I delve into learning it, though, can anyone recommend any languages that are:
(a) Relatively easy to learn for someone with a little (but not much) programming knowledge,
(b) Have a syntax which is simple enough to write quick and dirty programs in not a great deal of time,
(c) Powerful enough to perform quite complicated mathematical calculations, and
(d) Fast.
Also, any tips on how to pick up the language would be a good idea - links to good books etc. Thanks!
o/
I suspect that if it's mathematical calculations you're after, the package you're already using would be the best one for the job. The time taken to write the code in another language could easily outweigh the time taken to run the calculation the way you do it now.
Of course I don't know what types of calculation you're doing. C may well be able to do what you need.
To save you re-inventing the wheel though, Java or C# may have a better selection of maths library functions.
Ruby (http://en.wikipedia.org/wiki/Ruby_%28programming_language%29) is something I've been trying to dabble in. Highly portable and very forgiving when you're doing those quick and dirty scripts/apps.
Not sure if it will scale well in terms of uber mathematical calculations, but I'm sure a Google or two will tell you if it's feasible.
Something I might try to learn someday. Either that or Perl, or both.
leowyatt
13-09-2007, 15:32
I was going to suggest maybe trying Java, though my experience with Java ended around 6 years ago, the only programming I do now is in php, which is no good for what you need.
Plan on looking into Ruby myself well more ROR when I get some free time.
EDIT: Mark it has been suggested to wait for Perl 6 I think it is and not bother with Ruby
Arcade Fire
13-09-2007, 15:37
I should also mention that because I'm not planning on staying in academia for longer than another 2/3 years, I'd like to learn languages which will be useful in the real world. This seems to push me in the direction of C++/C# and perhaps some Java/PHP/Perl. Does anyone have any thoughts as to how widespread those languages are, and which ones might conceivable lead on from each other? For example, it seems that if I learn to code in C then that should be a stepping stone on the road to coding in C++/C#. Is that true?
From what I read rails is much better than perl at the moment in terms of speed, I've yet to see anything comparing perl 6 and Ruby but if it is better then it's definitely worth looking at. Perl's syntax and general language isn't as forgiving as Ruby, but it is better known, and there's a lot more out there to get/keep you going.
LeperousDust
13-09-2007, 15:40
Not a big programmer myself, but i would have thought MATLAB would have been perfect for very complicated maths, i'm desperately trying to remember what we used in uni and it's really not coming to me. But there was a program which (like MATLAB) was designed for just writing out maths basically. Once you got to grips with the syntax it was as powerful and scalling as you needed it to be. Give me a while to get my brain in gear i'll find it. Unfortunately its hard to get hold of (well it was for me, but i naturally didn't want to pay, i wanted to practice not actually use it) but i think if you pay it's pretty easy :).
LeperousDust
13-09-2007, 15:41
Oh just read the updates above, if you want it to be usefull in anything else in the world yeah choose something else :p
LeperousDust
13-09-2007, 15:43
In case you care it was Maple (http://www.maplesoft.com/) :) My memory seems pretty shoddy today :p
c++ is evil - and a cause of great stress...
unless of course you're an Ub3r coder then you'll be fine... using it to create mathematical classes is fairly straight forward but there are languages that'll make an easier job of in imo. still, the only other languages i bother with are web based :/
Arcade Fire
13-09-2007, 15:59
Cheers guys, this is all helpful stuff.
LD, I've dabbled with Maple before and it's definitely very powerful (probably the best symbolic language I've used in fact) but it suffers from the same problem as MATLAB, in that because it's so high level it's also very slow. It's not really designed for writing programs in - more for doing tedious symbolic manipulation one line at a time. It's very good at what it does, but what it does isn't what I need it to do.
Really depends what areas of programming you want to get into. If it's web-based, then Java (obviously), plus Ruby/Perl/PHP on the server side. If it's traditional then the choice is mostly C++, C#, and Java, though there's plenty of others around (Visual Basic, Delphi, COBOL, anyone? :))
Arcade Fire
13-09-2007, 16:01
I've heard that a lot of programs, particularly in the world of finance but also in accounting, project management etc., have their back end written in C++ or C# and their user interface done in VB. Has that been the case in anyone's experience?
well tbh, if you learn VB then i guess there'd be the really simple method of using excel.
you can make a nice easy to use, and easy to create interface with excel, then have a VB coded 'backend' to do all the complicated bits...
Has that been the case in anyone's experience?
Pretty much, a couple of big ERP systems I've put in have been similar like that (low level back end, high level front end), and it's a fairly obvious design choice so it's understandably common. Delphi front end's are also quite common ime.
Admiral Huddy
13-09-2007, 16:18
20 years of RPG/RPGIII and RPG ILE :(
a pint if you have heard of it.. ;)
Hint: it's not Role Playing Game or Rocket Propelled Grenade. ;D
I shudder to even think what would happen if Huddy got hold of the latter. :eek: :shocked: ;D
20 years of RPG/RPGIII and RPG ILE :(
a pint if you have heard of it.. ;)
You owe me a pint then :) Our ERP still has some older stuff written in RPG3.
I guess he should have known better that to make that offer on a forum with an above-average quota of geeks. ;D
LeperousDust
13-09-2007, 17:57
Isn't that similar to Pascal and/or Cobol? I had to code in pascal for a-level coursework only 2 years ago. Baby Jesus wept when i had to code in that...
I can't remember tbh, it's about 7 years since I did antyhing technical on the ERP. All I seem to do with it these days is sign off sodding large invoices.
I tend to do this sort of thing in PERL although I'm somewhat rusty with it these days. One of the guys is a bit of a genius with Ruby on rails so he tends to do all that sort of stuff instead of me these days.
Isn't that similar to Pascal and/or Cobol? I had to code in pascal for a-level coursework only 2 years ago. Baby Jesus wept when i had to code in that...
You ain't seen nothing yet. Try COBOL. Or JCL. Or a bazillion other mainframe-centric tools. :/
Here. Have some JCL. This is from one of our sample projects so I don't have to worry about NDA. Enjoy. :D
//P00045R JOB (AC6397),'JOB 1',CLASS=C,MSGCLASS=X,
// NOTIFY=BRL341
/*ROUTE PRINT RMT198
//************************************************** ***
//***** RUN DAILY REPORT 1 *****
//************************************************** ***
//STEP1 EXEC PGM=BATCH1
//VBTYPEIN DD DSN=PROD.VIDEO.BONDS.MASTER,DISP=SHR
//GAMEMSIO DD DSN=PROD.GAME.MASTER,DISP=OLD
//PLAYMSIO DD DSN=PROD.PLAY.MASTER,DISP=SHR
//STRANKIO DD DSN=PROD.STATION.RANK.FILE,DISP=MOD
//PP100AOU DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//************************************************** ***
//***** RUN DAILY REPORT 2 - USE DB2 *****
//************************************************** ***
//STEP2 EXEC PGM=IKJEFT1B,
// REGION=5200K,
// DYNAMNBR=60
//SALESIN DD DSN=PROD.SALES.TRANS.FILE,UNIT=TAPE,
// DISP=SHR
//PLAYMSIO DD DSN=PROD.PLAY.MASTER,DISP=SHR
//MAILMSIN DD DSN=PROD.MAIL.MASTER,DISP=SHR
//HOMEBYIO DD DSN=PROD.HOMEBUY.MASTER,DISP=OLD
//MAILXFIO DD DSN=PROD.MAIL.XREF.FILE,DISP=OLD
//PP200AOU DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD DSN=PROD.CARDS(REPORT2)
//
I've just spent the last week fixing bugs in this stuff. :/
LeperousDust
13-09-2007, 18:24
Yeah i've done COBOL work too, that was also soul destroying :)
That looks very familiar to some System36 legacy code on one of our 400's, though I believe that's RPG/RPGII.
o/
But I'm at home now. :p
The syntax in MATLAB is broadly similar to C, so the jump to that might be easier.
When uni stuff requires complicated DSP stuff we use C++ because you can code all kinds in a short space of time and its just about fast enough for realtime stuff. For absolutely massive calculations where vast amounts of data is analysed, the tool of choice is MATLAB. It might not be the fastest, but the development time to get the results you need is far shorter than C/C++ (unless you know the language like the back of your hand I guess!).
Perl tends to be the sysadmin approach to the world, the sysdevs at work all tend to use Ruby, perl or C++ depending on the task. Ruby is the way most stuff is going as it adapts very well to changes.
MarcLister
13-09-2007, 20:14
I'm er quite crap at programming so far at Uni. I'd like to get into some kind f programming just to build it up as a skill. Java I've already tried and failed at. I'm thinking of trying Python. It seems relatively new and unknown. Also there are no modules on Python at my Uni so I'd have to learn independently which might be better for me. Anyone know anything about Python and have any links to tutorials etc?
From what little I know about Python I think it can be used to put together a database of my music. Sad I know but its the only thing I can think of to program up.20 years of RPG/RPGIII and RPG ILE :(
a pint if you have heard of it.. ;)Mines a Carling thanks. :cool:
Ah yes, how could I forget python. I wanted to write a script that pulled information from the dhcpd leases file, added them into dns and so on (this was before ddns was in bind) so spent half an hour reading about python and it did the job.
The biggest python script I wrote was a client for livejournal.com but I got fed up of them changing the API just enough to break my script so I binned it.
It seems relatively new and unknown.
Python's been around for quite a while, ~15 years if college memory serves (early nineties). In my experience it's not a commonly used or sought after skill in business.
MarcLister
13-09-2007, 20:30
Python's been around for quite a while, ~15 years if college memory serves (early nineties). In my experience it's not a commonly used or sought after skill in business.I kind of meant new as in not as commonly known as say Java/Perl etc. ;)
It doesn't really have a high profile. I'd still like to learn it but I've no idea where to start. I've installed it but until I get an idea of the syntax or find some little project online to complete I'll find it hard to get into Python.
Admiral Huddy
14-09-2007, 10:02
Isn't that similar to Pascal and/or Cobol? I had to code in pascal for a-level coursework only 2 years ago. Baby Jesus wept when i had to code in that...
Nothing like it..
http://en.wikipedia.org/wiki/RPG_programming_language
vBulletin® v3.7.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.