Return to “Polls”

What programming/scripting languages have you used to write real programs?

APL
BASIC (any flavor)
Total votes: 41 (9%)
COBOL
Total votes: 5 (1%)
C
Total votes: 49 (11%)
C++
Total votes: 56 (13%)
C#
Total votes: 34 (8%)
D
FORTH
FORTRAN
Total votes: 5 (1%)
Java
Total votes: 65 (15%)
JavaScript
Total votes: 39 (9%)
LISP
Total votes: 7 (2%)
Lua
Total votes: 18 (4%)
Objective-C
Total votes: 3 (1%)
Perl
Total votes: 11 (3%)
PHP
Total votes: 29 (7%)
Prolog
Total votes: 6 (1%)
Python
Total votes: 51 (12%)
Ruby
Total votes: 10 (2%)
Scheme
Total votes: 3 (1%)
Total votes: 435
Post

Re: Programming Experience

#77
That's true for modern high-level languages; GOTO just isn't necessary. Having a way to branch to one of three labels on -1, 0, or 1 was just a neat little feature of FORTRAN.

Throwing hate at the GOTO is a little silly, though, since it's still a required feature of machine code and assembly language. This of course was the worst offender in that area. (And oh, look, there's Niklaus Wirth again.... :ghost: )
Post

Re: Programming Experience

#79
Graf wrote:My school's entire freshman engineering program is dedicated to MATLAB.
Gotta love MATLAB. You can do some cool shit with it. :thumbup:

Flatfingers wrote:That's true for modern high-level languages; GOTO just isn't necessary. Having a way to branch to one of three labels on -1, 0, or 1 was just a neat little feature of FORTRAN.

Throwing hate at the GOTO is a little silly, though, since it's still a required feature of machine code and assembly language. This of course was the worst offender in that area. (And oh, look, there's Niklaus Wirth again.... :ghost: )
Totally agree on this one. I remember my batch-coding days where I had to use GOTO EVERYWHERE.

And in PLC programming jumps are still regularly used.
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Programming Experience

#81
JanB1 wrote: Gotta love MATLAB. You can do some cool shit with it. :thumbup:
It is pretty cool, but now I always have to stop myself from starting my array indecies at 1 instead of zero, as well as dealing with the occasional weirdness of going out of bounds by 1 while I am programming in C or C++. It can be pretty annoying.
Libertas per Technica
Post

Re: Programming Experience

#82
Graf wrote:
JanB1 wrote: Gotta love MATLAB. You can do some cool shit with it. :thumbup:
It is pretty cool, but now I always have to stop myself from starting my array indecies at 1 instead of zero, as well as dealing with the occasional weirdness of going out of bounds by 1 while I am programming in C or C++. It can be pretty annoying.
Well, the cool thing is when you can define the starting and end point of your array freely. So, the array starts at 11 and goes up to 35 for example. THAT is a real mess up. Oh, and UDTs (user-defined types, so you can define a data type by yourself) of course too. :D
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Programming Experience

#83
JanB1 wrote: Well, the cool thing is when you can define the starting and end point of your array freely. So, the array starts at 11 and goes up to 35 for example. THAT is a real mess up. Oh, and UDTs (user-defined types, so you can define a data type by yourself) of course too. :D
That does actually sound pretty cool! I don't really know much about all the stuff you can do with MATLAB, as all I have been told is that it is 'useful'.

Unfortunately, my professors aren't programmers, so most MATLAB assignments are akin to "Write a 'For' loop and an 'If' statement to solve this contrived problem." It would be much better if they had a dedicated MATLAB class that freshman are required to take, rather than inconsistently ham fisting MATLAB into the regular courses. Several of my friends have their professor only teach MATLAB instead of the drone project that is supposed to be the focus of the curriculum. Some of my other friends have professors who haven't mentioned the language once. Most of my fellows in CpE, EE, and CS hate MATLAB, as all they have done with it are the basic assignments that do not demonstrate what MATLAB is good at, and instead often demonstrate what MATLAB's weaknesses are instead. :|
Libertas per Technica
Post

Re: Programming Experience

#84
Graf wrote:
JanB1 wrote: Well, the cool thing is when you can define the starting and end point of your array freely. So, the array starts at 11 and goes up to 35 for example. THAT is a real mess up. Oh, and UDTs (user-defined types, so you can define a data type by yourself) of course too. :D
That does actually sound pretty cool! I don't really know much about all the stuff you can do with MATLAB, as all I have been told is that it is 'useful'.

Unfortunately, my professors aren't programmers, so most MATLAB assignments are akin to "Write a 'For' loop and an 'If' statement to solve this contrived problem." It would be much better if they had a dedicated MATLAB class that freshman are required to take, rather than inconsistently ham fisting MATLAB into the regular courses. Several of my friends have their professor only teach MATLAB instead of the drone project that is supposed to be the focus of the curriculum. Some of my other friends have professors who haven't mentioned the language once. Most of my fellows in CpE, EE, and CS hate MATLAB, as all they have done with it are the basic assignments that do not demonstrate what MATLAB is good at, and instead often demonstrate what MATLAB's weaknesses are instead. :|
Yeah, it's called a "struct" and is pretty common in PLC programming. It's really useful. You can, for example, define a struct for a specific purpose that contains floats, ints, bools and arrays. So you can feed that struct to a function, and within the function read the values of different sub-variables (inside the struct) via dot-notation.

We used MATLAB for control unit simulation in our control engineering courses. That was really cool. We did everything, tested the effects of the proportional, integral and derivative part of controllers and tested different variants of controllers. Some worked really well (PI-Controller) and some were absolutely useless (PD-controller). In the end, we tested PID-controllers and figured out how to calculate the different configuration values for them. And in the end we did some Fuzzy-logik and experimented with the extremely fast Fuzzy-Controller. THAT was interesting.
Last edited by JanB1 on Tue Mar 28, 2017 12:28 am, edited 1 time in total.
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Programming Experience

#85
JanB1 wrote:
Yeah, it's called a "struct" and is pretty common in PLC programming. It's really useful. You can, for example, define a struct for a specific purpose that contains floats, ints, bools and arrays. So you can feed that struct to a function, and within the function read the values of different sub-variables (inside the struct) via dot-notation.
That's a thing in quite literally any modern programming language since C :ghost:
And in object-oriented languages you can even define "structs" (which are called objects and classes) that have their own functions. :)
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Image
Post

Re: Programming Experience

#86
Dinosawer wrote:
JanB1 wrote:
Yeah, it's called a "struct" and is pretty common in PLC programming. It's really useful. You can, for example, define a struct for a specific purpose that contains floats, ints, bools and arrays. So you can feed that struct to a function, and within the function read the values of different sub-variables (inside the struct) via dot-notation.
That's a thing in quite literally any modern programming language since C :ghost:
And in object-oriented languages, you can even define "structs" (which are called objects and classes) that have their own functions. :)
Yeah, I knew about the objects and classes and how you define them. And that you can add different variables and even functions to them. But I always had the feeling the UDT in PLC programming were easier to handle and make.
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Programming Experience

#87
I poked around for a few seconds, and I don't really see how MATLAB's user-defined types are any easier to use than, say, C#'s.

Code: Select all

//Defining and using a class in C#
class Example
{
 //Instance variable
 byte a;
 //Static variable
 static uint b = 0;
 
 //Constructor (but you could just as easily put any other function here)
 public static Example(byte c)
 {
  a = c;
  b ++;
 }
}

class Driver
{
 public static void main()
 {
  Example e = new Example(2);
 }
}
:eh:
Image
Post

Re: Programming Experience

#88
0111narwhalz wrote:I poked around for a few seconds, and I don't really see how MATLAB's user-defined types are any easier to use than, say, C#'s.

Code: Select all

//Defining and using a class in C#
class Example
{
 //Instance variable
 byte a;
 //Static variable
 static uint b = 0;
 
 //Constructor (but you could just as easily put any other function here)
 public static Example(byte c)
 {
  a = c;
  b ++;
 }
}

class Driver
{
 public static void main()
 {
  Example e = new Example(2);
 }
}
:eh:
Nah, not in MATLAB. In MATLAB they are difficult to define. But PLC programming is not MATLAB. It's...PLC programming. :lol:

But yeah, you're right. It's easier than I remember to define structs in other languages. Should have looked it up again. I apologize. It was a stupid point, when I think about it, it should have been clear that you can define your own data types in other languages as well, I'm not unfamiliar to OOP, but never really used it in other languages, because I always got told it is easier and more compact, but slower for my uses...
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"

Online Now

Users browsing this forum: No registered users and 2 guests

cron