|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
I joke that some guys my age buy roadsters for their mid-life crisis and all I want is to learn to write some code. My plea for advice is where to start. I think Python is prolly about right. If I understand correctly, Python is a "higher" language of C / C++ and thereby easier, or at least has a more direct type of syntax (if that's the right way to put it?). I have found Python for Newbies and a few other sites and documents that may be what I need. I can do a little HTML and hacking of some files, but it's really nothing more than substituting some words for others. It doesn't even qualify me as a script kiddie ... lol. My reasons for interest are not professional. I was thinking that I could eventually use open source code from others and perhaps apply modifications that I prefer. I have thought of taking some college courses at our local community college, but the truth is I'm not sure where to start given that my goals are likely aimed at some variation of C. My employer does pay tuition as long as I maintain a C average, so at this point it is a benefit wasted. Any and all advice would be greatly appreciated be it directing me to a helpful site, sharing experiences or even recommending "adult" courses. 
|
|
|
|
Joined: Oct 2006
Posts: 17,850
Legend
|
Legend
Joined: Oct 2006
Posts: 17,850 |
I would advise the use of Perl.
you'll find it a bit more useful (IMO) for alot of generic coding that will give you more practical purposes than a variant of C.
plus, plenty of free tutorials and websites online to learn directly from and lots of forums to ask questions on.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 14,248
Legend
|
Legend
Joined: Sep 2006
Posts: 14,248 |
Really depends one what you plan to do with it. Are you looking to write web-apps? Web-scripts? Applications? Games? Parse through databases? Excel-Charts?
Each specific type of programming has a prefered set of languages for it.
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
@ nologo - is perl also a higher language of C? Similar to Python?
@ Excl - applications that possible include games. I'm project leader of Maximo implementation (actually migration from Equipac) in my department at work. Obviously SQL knowledge was not a prerequisite. I joined as a member of the 3 person group and was promoted by virtue of the previous leader having knee surgery. Essentially I have the ability of reading and understanding a Where clause and by virtue of that I'm able to manipulate the code, albeit on a limited basis.
I really have little interest in SQL. I'd like to maybe toy around with GUI's and maybe someday actually write an app or two.
|
|
|
|
Joined: Oct 2006
Posts: 17,850
Legend
|
Legend
Joined: Oct 2006
Posts: 17,850 |
Perl is a hybrid between a true scripting language (like TCL) and object-oriented (like C). It's its own language however you can sort of consider it a higher level language than some because it allows for a very diverse set of syntax in it.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
OK. Thanks.
I think I've heard of Ruby as a variation of it. I read a few books about Linux and Torvlolds. There was some mention Perl's creator, Larry Wall. I occasionally watch the webcast of FLOSS Weekly with Randy Schwartz as the host. He apparently has a good reference book about Perl.
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Python is a great start - I'm actually going through a book with my son (he's 8 and has shown interest "in what daddy does at work") that I found on Amazon: http://www.amazon.com/Hello-World-Comput...6982&sr=1-1It's a great book for beginners too, but it is geared towards kids. Python is a nice start because it is an interpreted language as opposed to a compiled one; these, from my experiences, are typically easier to learn. After that I'd move onto .NET, preferably C#, if you wanted to "go further". You can download free IDE's for .NET development from the Microsoft website. There are TONS of resources and all kinds of entertaining things you can do with .NET. I'm working with the .NET micro framework now for fun doing some simple circuit board programming using Netduino. Pretty fun stuff! I'm also toying around with using graphics cards to process complicated business math equations. Graphics cards typically have many, many processors that are great at crunching numbers. My development laptop has an NVidia card that has 128 cores - they've got an API that can thread out functions to these 128 cores and return results much faster than a 4 or 8 core processor. You can also put in multiple graphics cards that have 512 cores on each board and utilize all of the simultaneously. Also pretty cool stuff that I am VERY exited about, though I'm just a newb at it now. Good luck in getting into programming. I love it and can't believe that I actually get paid good money to do it! Nothing like enjoying going to work every day.
#gmstrong
|
|
|
|
Joined: Feb 2008
Posts: 6,370
Hall of Famer
|
Hall of Famer
Joined: Feb 2008
Posts: 6,370 |
The last bit of programming that I've ever done was so many years ago - unless creating some AutoCAD menus counts as programming.
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
Thanks much ColumbusDawg. I read Ubuntu's Full Circle Magazine and they have an ongoing column about programming in Python and I've seen several "Python For Kids" sites so that did seem like a good place to start. I've also read that Perl is not overly complicated which is why I asked in the first place. Additionally what I've read up on so far also points to .NET. Some in open source don't want anything to do with it for obvious reasons, but there are some .NET apps at SourceForge, so I suppose productivity and ease of use win out for some despite proprietary code.  No matter where I start I have a lot to learn.  Good luck with the graphic card processing. Sounds enticing. You are certainly right about enjoying your work. My current project is obviously temporary and I fear that my next assignment may not be related to computing. I actually hope that my department decides that we need an Maximo admin and I'm selected. Perhaps I'll learn some SQL after all. 
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Quote:
Some in open source don't want anything to do with it for obvious reasons, but there are some .NET apps at SourceForge, so I suppose productivity and ease of use win out for some despite proprietary code
And those folks just really need to admit they are Microsoft bigots. I look at compilers as a toolbox - Java is great for enterprise web services; no one can deny that. For thick client applications? I wanted to kill myself using the Java Swing class. And as far as IDE's go, Eclipse sucks compared to Visual Studio 2010.
.NET can run on Linux just fine as long as you don't use any MS specific classes in your code - which is pretty easy to avoid since they have .microsoft. in them - using Mono. Heck, Ubuntu even ships with the .NET framework installed now as part of the core meaning it has to be there, which drove the "open source" folks nuts. You can even make your own .NET compiler if you felt like it - all the information to do so is available for free from Microsoft. .NET is very open source.
As far as I'm concerned, Google is a much scarier company than Microsoft is now.
Last edited by ColumbusDawg; 04/18/11 08:17 PM.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 34,622
Legend
|
Legend
Joined: Sep 2006
Posts: 34,622 |
When I started coding, or learning to code, I had trouble just reading the books. It was hard to wrap my head around until I could see it actually work.
Then I found a site called "lynda.com". For $25 a month you have access to video training for just about everything computer related. Before you sign up for classes I'd go on lynda for a month just to learn the basics... after that if you want classes, go for it.
I learned HTML, PHP CSS, JAVASCRIPT and how to use all the adobe software to build websites. They also cover a lot of open source things like wordpress.
I think they have some courses for programmers too. Programmers write software code. I just design site's and do some online applications.
Last edited by OldColdDawg; 04/18/11 08:45 PM.
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
Yeah Mono has some wrapped up pretty tight. I appreciate all the work that open source has done and find the virtues to be true, but I'm pragmatic enough to use what works for me. If I choose vanilla Ubuntu over Mint, the first thing I install is restricted extras so that says a lot about where I'm coming from. There is a lot of unwarranted contempt of MS, at least imho. I don't know if MS's latest gestures towards open source are an olive branch or not, but there is some irony that linuxtoday.com is full of MS ads. Besides XP is still a solid OS, dated or not. oldcold - I forgot about Lynda.com. I think I came across that site via a how-to book .... perhaps with freebies. Thanks. I'll keep that in mind. 
|
|
|
|
Joined: Sep 2006
Posts: 3,044
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 3,044 |
I would start with Microsoft Command Line/Powershell or Linux BASH Shell coding
its very powerful, it will teach you great fundamentals, and its easy to learn so you will learn sound logic
after that, then move on to a high level language...it will be much easier for you
you will use Shell Code often, its just so darn useful i recommend it.
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Quote:
I would start with Microsoft Command Line/Powershell or Linux BASH Shell coding
Very good suggestion. I use e command prompt and powershell quite often.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
I always thought point and click was the most productive and / or intuitive, but after using Terminal some I've realized that it can be better, given you know what to do. Right now it's not much more that paste / copy from message boards etc for me. None the less, that make sense. Thanks. Sidebar: My 3 year granddaughter had her mom's smart phone the other day and I watched her "flip" the menu to the app / game she wanted. That may have been some show and tell, but I also think that's a sign of an intuitive menu . 
|
|
|
|
Joined: Sep 2006
Posts: 14,248
Legend
|
Legend
Joined: Sep 2006
Posts: 14,248 |
Quote:
@ Excl - applications that possible include games. I'm project leader of Maximo implementation (actually migration from Equipac) in my department at work. Obviously SQL knowledge was not a prerequisite. I joined as a member of the 3 person group and was promoted by virtue of the previous leader having knee surgery. Essentially I have the ability of reading and understanding a Where clause and by virtue of that I'm able to manipulate the code, albeit on a limited basis.
I'd go with C+/C# then. It seems to be the norm for most application programming. It's the key language for MS Visual Studio, and you'll find it in a lot of game development as well. The other option is JAVA, but it is EXTREMELY object oriented ... so if you aren't that familiar with how that works, it can be a bit hard to pick-up and understand. (Also just so you know ... Java and Javascript are two seperate things)
I don't know the first thing about Python ... I *think* it's similar to Perl. Perl is a good powerful language to learn for scripting. Not necessarily something to make applications with, but if you need it to parse data files or strings, it's amazing. It's a good tool for web scripting, and creating html on the fly. Need to create a form on a web-site, hit submit, send an email, and then display a "confirmation" page? Perl's the way to go. Lots of free stuff out there, as it's an open-source language. I used to do a ton of web-page design and scripting back in the day, and most of it was in Perl.
If you really want to get into web-apps, then PHP might be the way to go. It's a little more powerful version of Perl. Javascripting is also a nice one to know, but not as crucial.
If you want to make some really, really simple apps ... then Visual Basic would be an easy thing to pick up. If you have Excel or Access, you can use VB as all their Macros are written in it. It's like a Visual Studio Lite, for a fraction of the cost. You can write full on Applications (Windows, with buttons and all other Windows objects) with Excel/Access itself. If you get Visual Studio later, you can use most of what you learned to create Visual Basic Apps, which operate outside of Excel/Access. I've been programming in Basic since I was 10, so it's definitely easy to pick up. 
Bash scripts are also good to know ... it's going to mostly be for things that you would schedule to run, but there's always a need for that. It's like a simpler version of Perl, but made to run a set of system commands. One of my first projects out of college was to create a compile process whenever new code was detected in a directory. It would kick off a new build, place the builds in distribution folders, then email the proper people. Great thing to know for system automation.
SQL is strictly for databases. It used to query or insert something from/into a database. Really great for pulling records, but there's not much else you can do with it. It's good to know on the side though, because lots of things will deal with a database.
These are languages that I've worked with, so I can't answer too much about Python or Ruby or some of the other languages. Hope that helps though.
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Quote:
If you want to make some really, really simple apps ... then Visual Basic would be an easy thing to pick up. If you have Excel or Access, you can use VB as all their Macros are written in it. It's like a Visual Studio Lite, for a fraction of the cost. You can write full on Applications (Windows, with buttons and all other Windows objects) with Excel/Access itself. If you get Visual Studio later, you can use most of what you learned to create Visual Basic Apps, which operate outside of Excel/Access. I've been programming in Basic since I was 10, so it's definitely easy to pick up.
You can download Visual Studio 2010 Express for free. It will likely do everything that a beginner would want. Instead of Visual Basic, Visual Basic .NET would be a better choice; again, I'd use C# but the beauty of .NET is that anything that he wrote in VB.NET can be easily used by C# developers. Microsoft, IMO, has the best development tools on the market currently. The .NET paradigm is fantastic and getting better and better with each release.
I do a lot of processor intense applications and the new PLINQ class in .NET 4 is awesome. I'm not sure if you use LINQ a lot in your day to day development, but PLINQ is LINQ on steroids as it threads out to multiple processors - just add a .AsParallel() to the end of your object in a LINQ query and you're parallel computing. It's a very nice implementation. I've really been getting into this parallel computing/GPU computing the last couple of months. It's a lot to wrap your head around but the performance increases are amazing.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 28,201
Legend
|
Legend
Joined: Sep 2006
Posts: 28,201 |
Quote:
@ nologo - is perl also a higher language of C? Similar to Python?
@ Excl - applications that possible include games. I'm project leader of Maximo implementation (actually migration from Equipac) in my department at work. Obviously SQL knowledge was not a prerequisite. I joined as a member of the 3 person group and was promoted by virtue of the previous leader having knee surgery. Essentially I have the ability of reading and understanding a Where clause and by virtue of that I'm able to manipulate the code, albeit on a limited basis.
I really have little interest in SQL. I'd like to maybe toy around with GUI's and maybe someday actually write an app or two.
SQL - Scarcely Qualifies as a Language 
If you are wanting to play with GUI's and WinForms, I can only recommend downloading the free Express version of Visual C# 2010 from Microsoft.
C# can also get you to gaming, you only need to consume OpenGL/DirectX libraries through COM, then you're off and running and doing the rest of it in managed code.
The great thing about using Visual C# is that you'll get IntelliSense, which means that the IDE will be correcting you alot as you go, which will help you learn, too.... and there are TONS of sample code and discussion boards out there for the language.... and it is almost the industry standard for .NET these days (and it pretty much is when it comes to doing ASP .NET work, too).
Browns is the Browns
... there goes Joe Thomas, the best there ever was in this game.
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Quote:
If you are wanting to play with GUI's and WinForms, I can only recommend downloading the free Express version of Visual C# 2010 from Microsoft
If you want to get into GUI's I'd recommend starting out with WPF as WinForms are on the way out.....you can do some very powerful things with WPF that would take a very long time to implement in WinForms. Plus if you REALLY want to get crazy you can delve into Expression Blend for customer controls. I can't even pretend to understand Expression Blend as it is a beast, but you can do some pretty cool things with it.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 15,015
Legend
|
Legend
Joined: Sep 2006
Posts: 15,015 |
jc.. You should start with Fortran and Cobol. 
We don't have to agree with each other, to respect each others opinion.
|
|
|
|
Joined: May 2008
Posts: 8,660
Hall of Famer
|
Hall of Famer
Joined: May 2008
Posts: 8,660 |
Does anyone know about Lua? I'm interested for recreational purposes, like changing or tweeking game scripts in Blitzkrieg and hope to someday build my own scenarios into mods/expansions. Is it something a person with limited computer language skills (HTML) can easily pick up? As mentioned above I was on my way to mastering html, before Java came along and screwed me up and was forced to walk away from it as it was detrimental to my own health  (I couldn't sleep) 
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Quote:
jc..
You should start with Fortran and Cobol.
Well, if we are going to go there why not just go for the gusto and use Assembly. 
#gmstrong
|
|
|
|
Joined: Nov 2006
Posts: 3,259
Hall of Famer
|
Hall of Famer
Joined: Nov 2006
Posts: 3,259 |
lua's great (my old job used it) but its an embedded language. Just downloading it wont get you something terribly useful, its meant to be a sandbox where you give it functions it can access. Embedded languages have a great success rate in games because really your looking for logic control on the data side using scripts and they provide quick iteration where recompiling your C++ code would take a bit longer. Other good embedded languages are squirrel and the javascript engines like spidermonkey and V8. If you want to make games Maddog C# is fast enough to do it, unity3d is popular and you write it all in C#, It's even free for the basic version. The main reason many game developers especially pro ones dont use C# is because C++ is much more directly portable to non PC architectures like xbox/ps3 and cell phones. If you want to make a game engine to learn programming though, unless you're talking a game like pong, I'd tell you to stop and do something else as a learning exercise. if you want to use something like udk or unity to learn C#, thats not a bad idea IMO and you might have fun too 
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 14,248
Legend
|
Legend
Joined: Sep 2006
Posts: 14,248 |
Quote:
Is it something a person with limited computer language skills (HTML) can easily pick up?
HTML isn't a programming language. 
Don't know anything about Lua though, other than I think World of Warcraft and other games use it as a scripting language. Scripting languages are usually easier to pick up, as they aren't so class/object-oriented intensive. If you understand the basic framework of programming like If statements, while loops, and the like ... then it's just a matter of picking up the syntax of the language.
|
|
|
|
Joined: May 2008
Posts: 8,660
Hall of Famer
|
Hall of Famer
Joined: May 2008
Posts: 8,660 |
|
|
|
|
Joined: May 2008
Posts: 8,660
Hall of Famer
|
Hall of Famer
Joined: May 2008
Posts: 8,660 |
Quote:
Quote:
Is it something a person with limited computer language skills (HTML) can easily pick up?
HTML isn't a programming language. 
Don't know anything about Lua though, other than I think World of Warcraft and other games use it as a scripting language. Scripting languages are usually easier to pick up, as they aren't so class/object-oriented intensive. If you understand the basic framework of programming like If statements, while loops, and the like ... then it's just a matter of picking up the syntax of the language.
So it's not as hard as Java?
|
|
|
|
Joined: Dec 2006
Posts: 1,590
Dawg Talker
|
Dawg Talker
Joined: Dec 2006
Posts: 1,590 |
I've been watching this thread and I gotta ask ... where would someone start with almost NO programming experience that could pick up something easy (that MIGHT even be able to be used in today's society as well  ) ... I have done excel with some visual basic stuff and that's about it. I also know a few html things ... once again ... not much though!
"Believe deep down in your heart that you're destined to do great things."
@pstu24
|
|
|
|
Joined: Sep 2006
Posts: 14,248
Legend
|
Legend
Joined: Sep 2006
Posts: 14,248 |
Quote:
I have done excel with some visual basic stuff and that's about it.
You answered your own question.
the VB stuff in Excel is pretty basic programming (no pun intended). You'll learn most programming concepts, and get a good taste of object oriented programming, without getting too crazy. And like I said before, most of what you'll learn will translate well if you ever jump up to Visual Studio, as it lets you program in VB (.net) as well.
And html isn't a language. 
|
|
|
|
Joined: Sep 2006
Posts: 14,248
Legend
|
Legend
Joined: Sep 2006
Posts: 14,248 |
Quote:
So it's not as hard as Java?
I haven't looked at Lua ... but it's a pretty good chance it will be much easier that Java. Java is about as crazy as it gets when it comes to OO programming.
|
|
|
|
Joined: Sep 2006
Posts: 1,346
Dawg Talker
|
OP
Dawg Talker
Joined: Sep 2006
Posts: 1,346 |
Quote:
SQL - Scarcely Qualifies as a Language
... all I know is that it is gawd awful boring
Quote:
You should start with Fortran and Cobol.
What do you have against me Florida? 
Speaking of Assembly ColumbusDawg I occasionally watch the webcast of Security Now with Steve Gibson (part of the same TWiT Network from Leo LaPorte that Floss Weekly comes from). Gibson is an old school Assembly guy ..... I can't imagine looking at rows of 0's and 1's and having even a minute concept of what all that switching on and off is doing. I do find it interesting none the less.
What I do know is that I have a lot to learn and I realized that anyway. My aim is maybe to be able to add additional function to existing software I use and undoubtedly that may be sometime down the road (as an example there was an app I was using recently that required one to go to File > Save and I wished I knew how to add a "save" icon to the interface).
I'm not sure how much I might work on games. I still play some shooters and there are a few ideas I've had. I have a small .NET app for Battlefield 2 that enables the changing of how many bots (computer players) are in a game and their skill level. This also can be done by opening the applicable .con file and editing it with notepad so with that I can conceptualize how the app works. Along the lines of what gage mentioned there are a number of similar files in B2 that are easily manipulated. I opened the botname.con file and changed the names so that now I fight alongside Woody Hayes and Abraham Lincoln while we take down the likes of Tinky Winky and Duke Nukem. 
Like I said before though that's certainly not programming ... just hacking someone else's work. I hope to see this through likely starting with Perl or Python. Before that I need to understand what "object oriented" is. 
A few other computing related notes ....
I finally moved into this century and bought a 23" widescreen LCD. I love the thing. I haven't rated it at newegg yet and likely can't be objective since I formally used an old, dark, behemoth 20" CRT. For $150 with no shipping charge I'm a happy camper. Btw, DawgTalkers looks great on this monitor. 
Speaking of widescreen ..... I've been using the RockMelt browser since beta and it also comes across well on the extra real estate. It's a modded version of chromium that is aimed at Facebook. I really like the two side panels it provides. On the left are my friends' profile pics that are sorted by activity (you can directly IM from their pics) and on the right are RSS / Atom feeds. The feeds are very handy shortcuts as each will pop out their listing with a mouseover. You can scroll through the feeds with your mouse wheel. Good stuff. I've heard that there are add ons that offer the same or similar functionality, but I like how it's packaged "out of the box".
|
|
|
|
Joined: Sep 2006
Posts: 6,683
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 6,683 |
Quote:
Quote:
jc..
You should start with Fortran and Cobol.
Well, if we are going to go there why not just go for the gusto and use Assembly.
I did that !
Welcome back, Joe, we missed you!
|
|
|
|
Joined: Nov 2006
Posts: 3,259
Hall of Famer
|
Hall of Famer
Joined: Nov 2006
Posts: 3,259 |
some assembly is better than others! I actually enjoyed doing motorola 68000 asm back in high school, but I still cringe when I stare at our matrix math optimization code written in x86 asm because theres just sooo many special cases. Right now I'm teaching myself multithreading in WINAPI, mainly waitless multithreading using the atomic functions. SIMD is fun to play with as well if you want to get down and dirty with that. Very useful stuff. I'd personally recommend C# over java as a starters language because of the tools. C# Express is free and you dont have to learn the tools as much, you just say "yes i want to make a windows project" and you get some real basic code to bring up a window and your off and running. java you can do that for the most part in eclipse but I feel microsoft's visual studio team is one of the best developer teams out there in the compiler/language biz. And if you're looking to market yourself, it seems C# developers outnumber the java ones on the job boards i've seen. C# will teach you everything you need to become a well rounded developer. It's syntax is also similar enough to other languages like C and Java that if you do decide to move on, it wont be painful. If you started learning in VBasic or Python it might be a tad harder to do. C# Express 2010 http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Multi-threading is one of the most difficult things to do correctly, especially using C and the WinAPI. .NET has made some vast improvements but there are still lots of gotchas where a programmer can make a catastrophic mistake. On top of that, threading bugs are a bear to track down as they do not ever happen consistently. I just fixed a bug a month or so ago that has been haunting us for 2 years because of a threading issue.
I enjoy thread programming as it is always a challenge. I don't get to do a lot of it though other than little projects I do on my own.
#gmstrong
|
|
|
|
Joined: Nov 2006
Posts: 3,259
Hall of Famer
|
Hall of Famer
Joined: Nov 2006
Posts: 3,259 |
multithreading has been mostly unused in game development until about 5 years ago. Most processors were single core both on PC and Consoles. And really games lend themselves to a certain chain of events:
while running checkInput updateGameObjects updatePhysics renderGameObjects updateSound end while
So it can be hard to thread it super efficiently. Removing a game object usually causes stuff to get removed in the renderer and sound portions for instance. The construct that seems to be used alot now is the thread-pool idea where you have N threads that mostly idle until you bring them in use. It works really well for speeding up certain hot spots games have, like particle system updates or culling render objects so you know whats visible, stuff that doesn't affect each other for the most part. But you dont want to throw locks around to protect data without thinking about it because badly constructed thread-safe code can cost as much or more than just running a standard for loop on it. So I've been researching into waitfree algorithms like waitfreestacks where you can place objects into a LIFO structure across N threads without locks and still be thread safe.
Nowadays with processors like the Core i7 having 8 or more logical cores, not knowing how to distribute your tasks is going to leave you in the dust performance wise, so I'm learning it, and got some good personal code running on it with good results so far. You can still deadlock or livelock in .NET but it does help catch many of the other gotchas you may run into like editing windows controls from multiple thread contexts.
#gmstrong
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
Have you looked int PLINQ at all in .NET 4? Not sure if you use LINQ at all, but PLINQ handles the threading to the multiple processor cores very nicely. Not sure .NET is an option for you, but if it is it might be worth looking into.
As I stated earlier in the thread, I am also working with utilizing the GPU's on NVidia graphics cards to handle complicated business math for retailers. I'm just getting started with this utilizing the CUDA API provided by NVidia - I also found an open source class for .NET called CUDA .NET that already has the C functions implemented as .NET methods. I'm very excited to get more into this type of processing as the speed increases based on my testing are awesome.
#gmstrong
|
|
|
|
Joined: Nov 2006
Posts: 3,259
Hall of Famer
|
Hall of Famer
Joined: Nov 2006
Posts: 3,259 |
CUDA is really good, OpenCL is another alternative, as is DirectCompute. my understanding of CUDA is that its nvidia specific but maybe i'm wrong. GPGPU is great if your trying to maximize your flops tho! Great example I can think of would be doing animation skinning since its matrix/quaternion math heavy.
Haven't touched linq or plinq, i've used sql in the past but we dont use it much on our project. the mmo team uses sql though for persistence.
#gmstrong
|
|
|
|
Joined: Feb 2007
Posts: 13,358
Legend
|
Legend
Joined: Feb 2007
Posts: 13,358 |
Quote:
And html isn't a language.
Yeah, it's hypertext markup la...
oh, wait. 
|
|
|
|
Joined: Feb 2007
Posts: 13,358
Legend
|
Legend
Joined: Feb 2007
Posts: 13,358 |
man, all this talk about languages and no mention of LISP?
|
|
|
|
Joined: Sep 2006
Posts: 4,480
Hall of Famer
|
Hall of Famer
Joined: Sep 2006
Posts: 4,480 |
CUDA is Nvidia specific. I'll look into the other two you've listed - I'm just getting into this stuff. No graphics manipulation here - just crunching numbers.
LINQ or PLINQ is not only for data manipulation even though it's syntax is "SQLish". You can have lambda expressions within it - really just about anything. I'm just getting into PLINQ, but it seems really easy to take an existing LINQ expression and make it parallel processing via PLINQ.
#gmstrong
|
|
|
|
Joined: Nov 2006
Posts: 3,259
Hall of Famer
|
Hall of Famer
Joined: Nov 2006
Posts: 3,259 |
ya the nvidia physx systems uses cuda for its physics calculations, pretty cool stuff. And ya thats the beauty of GPGPU, it doesn't need to be graphics related. really the animation skinning example I gave was just because the GPU is going to be better with floats than ints whereas most CPUs its the other way around, so if your doing alot of float math i can't help but think gpgpu is going to whoop on the cpu :P
#gmstrong
|
|
|
DawgTalkers.net
Forums DawgTalk Tailgate Forum Need Help - I Wanna Learn
Programming
|
|