It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
mrkgnao: After almost 20 years of professional programming, I can safely say that there is no such thing as self-explanatory code, only self-indulging coders.
Not in Perl there is... :-P
avatar
gooberking: If it were up to me I would just do HTML and CSS. Writing CSS and building responsive layouts is literally the only thing I care about or think I have any business doing. I don't see a lot of postings for that sort of thing.
I wish I had someone for that... I my current project I have to do everything, from the data-layer to the markup and CSS. I really much prefer working "under the hood" (regardless of client or server) and leave the pixel-pushing to people who actually enjoy it (and know what they're doing). A the times when I got a fully working template from the designer and only had to fill it with "life"...
Post edited November 17, 2015 by toxicTom
avatar
toxicTom: I wish I had someone for that... I my current project I have to do everything, from the data-layer to the markup and CSS. I really much prefer working "under the hood" (regardless of client or server) and leave the pixel-pushing to people who actually enjoy it (and know what they're doing). A the times when I got a fully working template from the designer and only had to fill it with "life"...
Couldn't agree more... I hate doing the 'design' element of web design and would much rather be coding stuff behind the scenes. Unfortunately my personal websites rarely require any serious code and it's mostly HTML and CSS (and some PHP)
avatar
mrkgnao: After almost 20 years of professional programming, I can safely say that there is no such thing as self-explanatory code, only self-indulging coders.
avatar
toxicTom: Not in Perl there is... :-P
What could be more self-explanatory than the attached perl code (from the internet)?

And I also attach the output (which I ran in cygwin).
Attachments:
code.png (40 Kb)
output.png (21 Kb)
avatar
toxicTom: Not in Perl there is... :-P
avatar
mrkgnao: What could be more self-explanatory than the attached perl code (from the internet)?

And I also attach the output (which I ran in cygwin).
That is awesome.
avatar
toxicTom: I wish I had someone for that... I my current project I have to do everything, from the data-layer to the markup and CSS. I really much prefer working "under the hood" (regardless of client or server) and leave the pixel-pushing to people who actually enjoy it (and know what they're doing). A the times when I got a fully working template from the designer and only had to fill it with "life"...
avatar
adaliabooks: Couldn't agree more... I hate doing the 'design' element of web design and would much rather be coding stuff behind the scenes. Unfortunately my personal websites rarely require any serious code and it's mostly HTML and CSS (and some PHP)
I spent most of my life up till now working with photographers and designers with images, so having something visual to focus on and work with feels pretty natural. When I've gotten to work with a designer to just implement a design it's been a lot more of a comfortable, rewarding experience.

I wanted to be one of those creative types growing up, but I've found out over time that I'm only so-so. That turns out to be a general problem as I'm one of those jack of all trades types that can do most anything, but not anything all that well. Where do you put a guy like that? Back end slinging mediocre code or on the front end? I think I would like the front end but it seems like such a person it is expected to be either a designer or have pretty serious JS skills (or both) to rock out the async stuff.

I've written a fair amount of JS code at this point, but if I'm going to have to seriously code stuff I'd prefer it to be in C#. JS is so loose it's super easy to get yourself into weird places and not know how you got there. .NET just has so much to offer and the compiler is pretty great at keeping you from making bone head mistakes. It's also a lot easier to trace code. JS lacks any real concrete relationship between things to the point that it feels like code mush when trying to mentally unravel it, where as in .NET a couple F12's can usually get you pretty close to the bottom of something.

Maybe it makes more sense when you do it more. So far I've only had to work on my own JS code. I'd hate to hear what my successor is going to say when he has to figure out the last application I wrote.
avatar
mrkgnao: What could be more self-explanatory than the attached perl code (from the internet)?

And I also attach the output (which I ran in cygwin).
0_o

That's real art.
low rated
avatar
Dessimu: Nice thread! I was starting to look for something like this here, on GOG forum. Great initiative.

I myself started learning to program Java, some HTML with CSS, a little JQuery, JavaScript, SQL. Doing this for 2 months now. I am intrigued, interested, frustrated and having fun all together. Most of the days I find myself working with NetBeans on Windows. And I still can't get used to using Linux.

Yesterday I was introduced to GIT - that is pretty handy little thing. And today I was shown how to use Maven. Did not get a hang of it yet.

That is as little about me as I can think of. Good to know I can find some fellow programmers here.
An interesting tidbit you might not know: git was actually written by Linus Torvalds (the original author and current maintainer of the Linux kernel) for use with the Linux kernel.
avatar
rtcvb32: I'm reminded that before PHP was in heavy use, Perl was the language of choice often for generating pages, and the whole CGI gateway thing that I never learned enough about in order to actually do anything with.
You can actually write CGI in pretty much any programming language. I even once wrote a toy example in either C or C++. Just be careful about security issues (there's a reason those two languages aren't widely used for this purposes).

Maybe Rust might be a good language for this purpose, since it has rules (checked at compile time) to prevent memory errors from happening.

avatar
Maighstir: A classic statement: there are 10 kinds of people - those who understand binary and those who don't.
avatar
Tallima: There are 10 kinds of people. Those who don't know anything about theoretical computational models, those who do, and those who know that trinary is the most efficient.

(I'm still waiting to see someone figure out how to build an e-nary computer -- that's technically the most efficient)
Do you, by any chance, have a link to any website that explains why trinary (or better yet, e-nary) is the most efficient?

(Note that I actually do have a mathematics background, so it is not a problem if that site is heavy on math.)

avatar
toxicTom: Yeah, Perl is really cryptic (origin of RegEx...).
avatar
mrkgnao: Funny that.
I know perl for about 10 years and python for a few months only, and I tend to think of python as cryptic (with all its generators and closures and static methods and class methods and decorators and mutables and immutables etc.), whereas perl is so clear and simple and straightforward.
You don't need generators, closures, static and class methods and decorators to program Python. The stuff is there, but you don't need to know about it to write useful programs. (The stuff can sometimes come in handy, of course.) In fact, even though everything is an object, you don't actually need to know it. You can learn the basics first, and then learn the rest when you actually start to need it.
Post edited November 18, 2015 by dtgreene
avatar
dtgreene: An interesting tidbit you might not know: git was actually written by Linus Torvalds (the original author and current maintainer of the Linux kernel) for use with the Linux kernel.
That was actually a third thing they said after mentioning git. And I must admit, I was really surprised!
Well, professionally 15 years as a SAS programmer, that's statistical programming not special forces :o)
Add to that some C#, VB(A). And outside work have dabbled in most languages from back in the days of basic on Spectrum, Cobol/Ada at Uni etc.

When I was younger I used to write adventure games, text based, then moved into point and click using a free copy of Delphi. Don't have the time any more though, would like to put some time into really learning Godot.

Interesting thread!
avatar
dtgreene: You can actually write CGI in pretty much any programming language. I even once wrote a toy example in either C or C++. Just be careful about security issues (there's a reason those two languages aren't widely used for this purposes).

Maybe Rust might be a good language for this purpose, since it has rules (checked at compile time) to prevent memory errors from happening.
Let's not forget i was using Geocities at the time (since bought out by Yahoo, and then discontinued). I seriously couldn't find any information on the API, what programs i had access to for running or scripting or anything. Maybe CGI was easy, but i had nothing to work with with my inexperience.
low rated
avatar
toxicTom: Not in Perl there is... :-P
avatar
mrkgnao: What could be more self-explanatory than the attached perl code (from the internet)?

And I also attach the output (which I ran in cygwin).
Look up the International Obfuscated C Code Competition. It's in C, but the idea is to write code that is intentionally hard to read. Some interesting results have come out of it, including a BASIC interpreter and even an x86 emulator. At lease one submission was a game played through error messages (it didn't compile, but instead gave, as errors, the description of what's going on).
avatar
adaliabooks: Yep, that's exactly my problem..
"No need to comment this, it's obvious what it does!"
Come back a few months later and wonder what the hell I was doing... XD
avatar
toxicTom: I think every single one who writes code has been there ;-)
This is the absolute devil for a coder, there is no right or wrong way to code (ok there is a wrong way) and something we all tend to do and get a little lazy but do make it common practice to comment and set reminders in your code, you can of course edit those out when your code is complete of course but it certainly helps if you ever have to come back to it at a later time.
avatar
dtgreene: You don't need generators, closures, static and class methods and decorators to program Python. The stuff is there, but you don't need to know about it to write useful programs. (The stuff can sometimes come in handy, of course.) In fact, even though everything is an object, you don't actually need to know it. You can learn the basics first, and then learn the rest when you actually start to need it.
I know. However, at the moment I am developing a rather sophisticated testing framework that does make use of all of these.

And, of course, you don't need the following to write useful programs in perl:
print($_)
$| = 1;
foreach my $f (@{$$lang_arr_ref[1]{$os}})
$time =~ tr/ :/__/;
$field =~ s/(\(.*?\))/ $1/g;
$new_size =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;
[all are real life examples from MaGog's code]

P.S. For those who haven't realised it yet, perl is the mother of cryptic obfuscated languages. The reason I like it is because it writes much like a natural language, full of grammatical quirks, whereas most other languages feel artificial to me. Which shouldn't be surprising, since Larry Wall, the creator and benevolent dictator for life of perl, studied linguistics (and won the International Obfuscated C Code Contest twice...). I write code much the same way I write fiction, attempting to impose my vision on an unruly language.
avatar
mrkgnao: What could be more self-explanatory than the attached perl code (from the internet)?

And I also attach the output (which I ran in cygwin).
avatar
dtgreene: Look up the International Obfuscated C Code Competition. It's in C, but the idea is to write code that is intentionally hard to read. Some interesting results have come out of it, including a BASIC interpreter and even an x86 emulator. At lease one submission was a game played through error messages (it didn't compile, but instead gave, as errors, the description of what's going on).
Oh yes, the delightful Obfucsation. If you want to go really extreme:
https://en.wikipedia.org/wiki/Esoteric_programming_language
I mean a whole language using just the word "Ook", the Librarian must have invented that on Hex!
avatar
dtgreene: You don't need generators, closures, static and class methods and decorators to program Python. The stuff is there, but you don't need to know about it to write useful programs. (The stuff can sometimes come in handy, of course.) In fact, even though everything is an object, you don't actually need to know it. You can learn the basics first, and then learn the rest when you actually start to need it.
avatar
mrkgnao: I know. However, at the moment I am developing a rather sophisticated testing framework that does make use of all of these.

And, of course, you don't need the following to write useful programs in perl:
print($_)
$| = 1;
foreach my $f (@{$$lang_arr_ref[1]{$os}})
$time =~ tr/ :/__/;
$field =~ s/(\(.*?\))/ $1/g;
$new_size =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;
[all are real life examples from MaGog's code]

P.S. For those who haven't realised it yet, perl is the mother of cryptic obfuscated languages. The reason I like it is because it writes much like a natural language, full of grammatical quirks, whereas most other languages feel artificial to me. Which shouldn't be surprising, since Larry Wall, the creator and benevolent dictator for life of perl, studied linguistics (and won the International Obfuscated C Code Contest twice...). I write code much the same way I write fiction, attempting to impose my vision on an unruly language.
Am afraid my tastes are simpler than that:
select NEEDLE from HAYSTACK
Post edited November 18, 2015 by nightcraw1er.488
low rated
avatar
dtgreene: Look up the International Obfuscated C Code Competition. It's in C, but the idea is to write code that is intentionally hard to read. Some interesting results have come out of it, including a BASIC interpreter and even an x86 emulator. At lease one submission was a game played through error messages (it didn't compile, but instead gave, as errors, the description of what's going on).
avatar
nightcraw1er.488: Oh yes, the delightful Obfucsation. If you want to go really extreme:
https://en.wikipedia.org/wiki/Esoteric_programming_language
I mean a whole language using just the word "Ook", the Librarian must have invented that on Hex!
Don't forget Whitespace, a programming language whose code consists of non-printing characters.

Of course, that means I can't post an example on this forum because it doesn't preserve whitespace characters. (Posting Python code is bad enough because indentation, which this forum doesn't preserve, is part of the syntax, but Python is at least designed to be readable, unlike Whitespace.)

By the way, anybody heard of INTERCAL? Better yet, has anyone tried to write code in it? Even better yet, has anybody done so with punch cards?

avatar
nightcraw1er.488: Am afraid my tastes are simpler than that:
select NEEDLE from HAYSTACK
Of course, you need to be careful not to put user input directly into the SELECT statement.

Imaging if you replace NEEDLE with user input, and then a user typed something like the following:
NEEDLE') from HAYSTACK; DROP TABLE HAYSTACK; --

(This might be a bit off, but you get the idea. If it's wrong, you might get strange errors.)

Sometimes, doing things the simplest way can lead to security issues. Just ask little Bobby Tables.

https://xkcd.com/327/
Post edited November 18, 2015 by dtgreene