Jump to content
  • Announcements

    • AndalayBay

      Linode Critical Maintenance   01/10/2018

      Linode has announced our service slot for the patch for variants 1 and 2 of the Spectre vulnerability. The server will be rebooted at 2018-05-09 3:00:00 AM UTC.  I have updated the forum thread -  please see my post here.
Sign in to follow this  
Malonn

Programming Languages

Recommended Posts

I was wanting to dabble in a new programming language and was wondering what those with experience think would be a good starter language.  The only language I've ever written a program in is AutoHotkey.  I've toyed with C++ and HLSL (because it's similar to C++), but am familiar with the logic and flow of programming.  I'd like something powerful, but with easy syntax.  What do you all think (AndalayBay, Visceral Moonlight)?  I don't have a specific program to write or anything like that.  Programming relaxes me.

Share this post


Link to post
Share on other sites

I started with QBASIC. It's very structured but uses words instead of symbols. Unlike some languages, it's not conversational but the syntax itself is similar to C-like languages once you add the symbols in. Despite what a lot of people say, I find it a good place to start since the structure is similar to the more advanced languages but you don't need to worry about the finer details that could be confusing early on.

Share this post


Link to post
Share on other sites

*Rubs hands together* Here are my recommendations. I’ve always found programming courses hard because I’m not an abstract thinker. I need a specific example. So I recommend picking a project first. Second, object-oriented or not? I recommend object-oriented. I found it very difficult to learn Java at first because I didn’t have a project, so I couldn’t understand the concept of classes. The stupid Dog examples were meaningless. However once I built an application to update a database, bingo! It all made sense. I think there are some projects that would be easier to code in a traditional language. Not object-oriented in other words. But these days you’ll get a lot more milage from an O-O language.

Possible Projects

  • One project I’ve been wanting to do for a while is a password generator and storage app. I don’t want to store my passwords in the cloud. I don’t trust them.
  • Video game utility. I’ve got a project planned for Oblivion that I will use to learn C#.
  • Video game. I don’t mean something on the scale of Oblivion of course. My brother-in-law wrote a little game called Bridge Inspector that he used to learn Basic. Video games usually need to be very fast, so they are often written in traditional languages like C. Bridge Inspector as a very simple game and it could have been written in an O-O language. My husband and I wrote a solitaire game called Spider. We had custom difficulty settings that I’ve never seen in any other version of the game. I think we’ll rewrite it for mobile.
  • Shopping cart  processing for web site. I worked for a company that used Java for this and it was ridiculous. PHP is usually used for this.

Languages

I don’t know C++. I’ve tried to learn it, but it’s too obtuse for me. I like languages that are easier to read. Java is a pain in the ass. It’s long and you have to code everything. It also sucks when it comes to performance. My current pick is C#. It’s very similar to Java but it has more built-in functions. It’s also multi-platform. You can write desktop and mobile apps with it. The final kicker is that it has support for Windows, Linux and the Mac.

I also use Javascript and PHP, but I only use them for browser apps. I prefer to use HTML 5, which actually replaces Javascript in many ways. I only use Javascript as a helper because people can disable it. HTML 5 has new field attributes that replace stuff you used to do in Javascript, so I don’t use Javascript for much now. The latest versions of PHP are object-oriented and I love using those features for my shopping carts. I use PHP for all my server-side processing. PHP is easy to learn, but once again, having a specific purpose helps.

If you go with C#, you’ll probably use Visual Studio. Visual Studio even runs on Linux and Mac now. It looks quite nice on a Mac and has a proper Mac interface.

Share this post


Link to post
Share on other sites

Enjoyed VB5-6 immensely. It was the first time the world had eve seen an IDE with so much power and capability.

But give me a Mac and Visual Fortran would be the one now. Back in the day it was a well known fact Fortran performed better on a 68000 based processor than the 8080.

Share this post


Link to post
Share on other sites

Hey, I used to teach programming! :P

My recommendations are to start small and go from there. I also wouldn't recommend just jumping straight into object oriented programming as it can be a bit confusing and you may find that you don't program in that way (I certainly don't, I program the way I think!). In addition, I recommend using a text-editor over an IDE at first to help you understand better the various parts of the language. I've found that too many times people learn to lean on the IDE and, as a result, don't learn how to actually code all that well. As for languages, a good starting language is one with a limited vocabulary but still useful. Most of my first programs were command-line programs that helped calculate various things for games. Once you get a better handle on the logic and all, then I would worry about finding the right advanced language for yourself. :)

Share this post


Link to post
Share on other sites

This is why I suggested picking a project first: it helps you choose the language. @Malonn if you do a search for the languages Schtearn and VM suggested, I think you’ll find that they are used for specific applications. Fortran is typically used in science and mathematics, for example. Visual Fortran might be more extensive, but it’s not used much. You can get a job writing C# if you wanted to.

In terms of an IDE, there is a learning curve as VM said, but they do help keep your files organized and you can compile and debug your program right in the IDE. I just use a text editor when I’m writing PHP, but I use VS for C#. Mind you the programs I’m writing in C# involve creating a GUI and that would be quite tedious in a text editor. :P

Share this post


Link to post
Share on other sites

Sounds like I blindly started out right by choosing AutoHotkey to break into the world (well Oblivion scripting was my first taste)--though there's debate if it's a true language or just a scripting language.  I don't know what Object Oriented programming is, to be honest.  Google could tell me for all that I will post, but I'd rather hear it from you all.  Anyone have experience with AutoHotkey?  I may stick with it until I'm as comfortable with it as I am with Oblivion scripting.  I read that Python was easy, but you guys disagree.  Why?  Maybe a good next step will be CSS or HTML?

AB, what other project ideas do you have.  I've just been screwing with Oblivion utilities; a front end to robocopy; appending certain things I use to the Oblivion.ini, etc.  Simple stuff, though I've found that things always take more time than you plan for.  Especially getting familiar with the damn Windows API.  By the way AB, what utility are you planning on writing for Oblivion?  I loooove new, shiny Oblivion stuff. :)

One thing I've become more familiar with is the command line and batch scripts.  Surprisingly, I can get things done with batch script.

Share this post


Link to post
Share on other sites

CSS and HTML are layout languages and not usually considered programming languages. :)

I try to use OS APIs as little as possible. I've found that, in most cases, you can usually do the equivalent without them with just a couple more lines of code (as long as we're not talking about things like services and whatnot).

Writing code for daily tasks you find is the way to go. I wrote a text file merging program a few years ago as I needed something specific that wasn't offered via other programs. I basically needed a way of maintaining config files as multiple files easily so I wrote a program to merge the smaller files together.

Share this post


Link to post
Share on other sites

Here’s the definition of OOP on Wikipedia. You can see by reading that that it quickly becomes unwieldy if you don’t have a specific example. A shopping cart is a good example. You would define a class for the shopping cart itself. The shopping cart would have attributes, or variables, that would define the items in the cart. Then you would have methods, or functions, for retrieving and updating the variables. They are called methods because they are the mechanism for interacting with the class. You don’t use global variables in OOP. Some people do of course, but it’s bad form and usually winds up biting you in the ass.

In some ways Oblivion scripting is object-oriented. Your class would be an NPC, for example. You instantiate that class by placing the NPC in the game world. Your methods would be the scripts that interact with the NPC. Oblivion scripts are also event driven, especially if you use OBSE. I rewrote Oblivion XP is use events and it drastically improved the performance. Now when the NPC is killed, the death event is triggered and my script runs to award points to the player.

Bethesda took things a step further with Skyrim. Papyrus is object-oriented. Ironically I’ve found Skyrim modding hard to learn because of the Creation Kit, or the IDE. They really made a mess of the quest and dialogue windows, at least from my point of view.

Python is a scripting language. A lot of people like it and you could help some of the Oblivion teams if you learned it. I think Wrye Bash is written in Python. I don’t like it because it doesn’t have parentheses, so it uses spaces for nesting. Therefore just loading a Python script in a different text editor could break it.

I don’t want to say anything about possible projects until I actually get some work done on them. I’ve announced stuff in the past only to have to cancel the project and I don’t want to do that again. :)

Share this post


Link to post
Share on other sites
16 hours ago, Visceral Moonlight said:

Hey, I used to teach programming! :P

...In addition, I recommend using a text-editor over an IDE at first to help you understand better the various parts of the language...

The beauty of an IDE is the range of templates and snippets. Visual Studio may be too much for a beginner- but it's great for templates at least.

I'm not a fan of Python- but only because I've either seen code which could have been presented in a better format, or uncommented code. OTOH Utumno's coding style seen in Wrye Bash is very good,- which for the non-Pythonista fraternity is something like bordering on readable. :P 

The PyCharm IDE might be ideal for someone wanting to get started in Python, but again, it's all down to personal taste- you have to try it out- and if something smells, move on. :P

There's also Delphi and Pascal. Delphi's expensive, but Pascal is definitely worth a look if wishing to contribute to XEdit scripting. Just do a Google. :)

 

Share this post


Link to post
Share on other sites

I was tortured with Pascal in university. They wanted to pick a language nobody would know. It was old Pascal though - not object-oriented. Delphi is object-oriented Pascal and the new Pascal is O-O. I also find it completely unreadable. :P

A bit of background on the languages people pick for Oblivion utilities: they pick a language they want to learn and use creating an Oblivion utility as their project. Sound familiar? :lmao: I know from talking to most of the developers. In the case of elminsterAU, the guy that created TES4Edit, he needed to learn Delphi for work so he wrote the utility. Yes, he has a weird job. :rofl:

Share this post


Link to post
Share on other sites

We should start a thread on interesting facts about modders. :D Here’s another: SirFrederik, the original author of Oblivion XP, is a nuclear physicist.

Share this post


Link to post
Share on other sites

We should start a thread on modders.  I think it's neat to read a little background behind the people who create my favorite mods.

Hey, is anyone familiar with Rust??  There's this and I'd like to give it a whirl, but don't know shit about Rust.  I'd buy someone a beer if they compile that for me :D

Share this post


Link to post
Share on other sites

Yeah, that's part of what makes Windows a pain for development. It does have a bunch of third party package managers but it'd help to have a good centralized one built in to the system. There is the built-in Linux virtual machine but I haven't tinkered with it (I did install it, just haven't bothered to play with it).

Share this post


Link to post
Share on other sites

Jimi thinks Rust is from Facebook, Go by Google, Lotlin, Swift (Apple)... Here’s a huge list on Wikipedia. It can get overwhelming. Jimi and I stick to languages that people are paying for, even if we don’t intend to program professionally.

Share this post


Link to post
Share on other sites
16 hours ago, AndalayBay said:

Jimi thinks Rust is from Facebook, Go by Google, Lotlin, Swift (Apple)... Here’s a huge list on Wikipedia. It can get overwhelming. Jimi and I stick to languages that people are paying for, even if we don’t intend to program professionally.

Good link, AB.  Quickly found what I needed.  Unfortunately, Rust requires the dag blasted C++ Build Tools to install.  Seems like a lot just to compile 1 little program.  I'm picky about what goes on my drives.

Share this post


Link to post
Share on other sites

Sooo... if someone here already has the C++ Build Tools (which many of you do, I'm sure, you programmers) you could download the Rust tool and compile that source for me? :beerchug:

Plus, plus, if you have Oblivion installed and regularly play it, you can test out the app.  It's a heap replacer (I believe); Oblivion needs help in the heap area when running hi res textures and lots of big mods.

I mean I'd really be doing you all a favor here... B-)

Share this post


Link to post
Share on other sites

I gave up on heap replacers. They never seemed to work and just caused crashes.

You would also need a rust compiler to compile that. If you don't know rust, I don't recommend using it because you have no idea if the code is good or not.

Have you tried MoreHeap? Written by my buddy shadeMe and the xkcd comic is worth it. :D

Share this post


Link to post
Share on other sites

True.  I know nothing about Rust or writing heaps for videogames, so it could be more trouble than it's worth.

I do use OSR, and have good results, but I'm running without heap replacement at the moment to see what gameplay feels like.  I'm pleasantly surprised so far.

I have MoreHeap, but have never really tested it out.  I read somewhere it replaces the Windows heap, not Oblivion's.  I don't know the relationship between the Windows heap and Oblivion's (if someone does, I'd love to read that reply), but I will give it a go once I'm done testing a heap replacement-free trial.

Share this post


Link to post
Share on other sites

MoreHeap allocates more heap, or initial memory allocation to Oblivion on startup. It’s not a swapper. It’s only a fix if your load order is such that you run out of memory on startup. shadeMe also says that it’s experimental. The source code is probably available on GitHub.

I found programs that try to swap heap cause crashes. Perhaps it has something to do with caching. Basically if something is swapped out to free up heap space, but then the program wants to access that block, it crashes. That’s my theory and I don’t really understand heap stacks either. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×