Programming Experience

Want to reach a consensus? There's no better way than a poll!

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

APL
1
0%
BASIC (any flavor)
37
9%
COBOL
5
1%
C
44
11%
C++
52
13%
C#
33
8%
D
1
0%
FORTH
1
0%
FORTRAN
4
1%
Java
59
15%
JavaScript
36
9%
LISP
7
2%
Lua
16
4%
Objective-C
3
1%
Perl
11
3%
PHP
25
6%
Prolog
6
1%
Python
49
12%
Ruby
9
2%
Scheme
3
1%
 
Total votes : 402

Re: Programming Experience

Postby Dinosawer » Mon Mar 27, 2017 12:10 am

Well those velociraptor attacks are annoying
Image

More seriously, it makes your program hard to read for other people (or yourself a few months later) and you can do everything without them more clearly
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Image
User avatar
Dinosawer
Admiral
 
Posts: 5821
Joined: Fri May 09, 2014 1:08 pm
Location: Belgium

Re: Programming Experience

Postby Flatfingers » Mon Mar 27, 2017 12:20 am

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: )
User avatar
Flatfingers
Vice Admiral
 
Posts: 4542
Joined: Sat Nov 24, 2012 12:45 am

Re: Programming Experience

Postby Dinosawer » Mon Mar 27, 2017 12:26 am

Yeah, I don't hate it but it makes me even less fond of my predecessor when I find it in C++ in a function of a couple thousand lines :ghost:
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Image
User avatar
Dinosawer
Admiral
 
Posts: 5821
Joined: Fri May 09, 2014 1:08 pm
Location: Belgium

Re: Programming Experience

Postby JanB1 » Mon Mar 27, 2017 1:37 am

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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby Scytale » Mon Mar 27, 2017 9:01 am

Also a remark, Fortran used to be exceptionally fast for numerical purposes, possibly the fastest. My understanding is only recently did C++ 'catch up' in this area. But IANACS
User avatar
Scytale
Vice Admiral
 
Posts: 2826
Joined: Thu Nov 22, 2012 4:40 pm

Re: Programming Experience

Postby Graf » Mon Mar 27, 2017 1:02 pm

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
Graf
Commander
 
Posts: 248
Joined: Sun Mar 09, 2014 8:14 pm
Location: Virginia, USA

Re: Programming Experience

Postby JanB1 » Mon Mar 27, 2017 1:52 pm

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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby Graf » Mon Mar 27, 2017 3:25 pm

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
Graf
Commander
 
Posts: 248
Joined: Sun Mar 09, 2014 8:14 pm
Location: Virginia, USA

Re: Programming Experience

Postby JanB1 » Tue Mar 28, 2017 12:23 am

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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby Dinosawer » Tue Mar 28, 2017 12:25 am

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
User avatar
Dinosawer
Admiral
 
Posts: 5821
Joined: Fri May 09, 2014 1:08 pm
Location: Belgium

Re: Programming Experience

Postby JanB1 » Tue Mar 28, 2017 12:27 am

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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby 0111narwhalz » Tue Mar 28, 2017 2:06 am

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:
User avatar
0111narwhalz
Commander
 
Posts: 449
Joined: Mon Feb 01, 2016 11:40 pm

Re: Programming Experience

Postby JanB1 » Tue Mar 28, 2017 3:20 am

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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby JanB1 » Tue Mar 28, 2017 8:07 am

Just gotta...drop this here. Because I thought it was really funny and fitting.

https://imgur.com/gallery/9bp5R
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"
User avatar
JanB1
Rear Admiral
 
Posts: 1273
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Programming Experience

Postby Talvieno » Tue Mar 28, 2017 8:14 am

Fake and old, but funny, yes. :P
Image
Have a question? Send me a PM!
User avatar
Talvieno
Community Manager
 
Posts: 8197
Joined: Fri Apr 11, 2014 6:50 pm
Location: North GA, USA

PreviousNext

Return to Polls



Who is online

Users browsing this forum: No registered users and 2 guests