He appears to be using the Gauss algorithm for finding Easter for any particular year. These kind of examples were popular in the day. Here is the general formula that he is using, but his dialect of BASIC is slightly different than this example (and some variables are ordered differently on each line). Otherwise, it matches line-for-line.
a = Y mod 19
b = Y / 100
c = Y mod 100
d = b / 4
e = b mod 4
f = (b + 8) / 25
g = (b - f + 1) / 3
h = (19 * a + b - d - g + 15) mod 30
i = c / 4
k = c mod 4
L = (32 + 2 * e + 2 * i - h - k) mod 7
m = (a + 11 * h + 22 * L) / 451
month = (h + L - 7 * m + 114) / 31
day = ((h + L - 7 * m + 114) mod 31) + 1
His BASIC environment isn't very great, because while it gives the error (one of the divide statements ends up with a number which is too large), it does not give a line number. I remember typing in a similar example as a child. It was pure magic in 1980.
Has there ever been a BASIC with a GOSUB statement that would be usable even vaguely like that? (I've never seen a GOSUB with parameters and a return value like a function in a more modern language...)
There certainly hasn't been an Amiga BASIC that looked like that... you wouldn't see a black screen with no GUI like an old DOS machine... (Blitz Basic 2 was great - one of the things that really got me starting in game development, but that wasn't around until towards the end of the Amiga's life)
I myself have done GOSUBS where the line number of the routine was generated at run-time as a variable or an expression. I've never seen a variant of BASIC where the subroutines themselves acted as a function (which returned as a variable). It was explicitly for branching.
Even then, it doesn't seem to make sense, because the line still contains exact operations which are to be performed. If I had to speculate, perhaps they were trying to avoid a potential copyright issue by putting their own twist on some vintage code that they lifted from another source?
He's faster typing than most of the programmers I know. He also has the ability to type concurrently, which places him above any auto-completion module on Earth (And he's just starting).
He may be a magician, after that trick with the box...
I type at 100wpm. A programmer I work with would always be slow to respond over IM and I would always think "oh, he is very busy". Then I saw him working once.
Literally hunt and peck typing with one finger on each hand. I have to constantly remind myself to slow down if I want to even try to type as slow as he types. Unbelievable.
Seems like AmigaBasic is what Joe would be using to learn programming, although the producers probably thought a simple black screen with white text would read better.
I just realized that I'm going to be very disappointed if I try holding HCF to the same technological accuracy & verisimilitude standards that I hold Mr. Robot to. Not that I don't still love the show (& have since season 1), of course!
Well, Mr. Elliot is the only one who thinks keeping kernel panics in your head is useful, so you can dump them later on text to help you with personality disorders and addiction. lol
I hate to be that guy but it's a show. It never claimed to be technically correct. It was always billed as a drama. Every show has errors even Silicon Valley and Mr. Robot. Some just have more than others.
Silicon Valley is a comedy about tech.
HCF is a drama set in a tech based world.
Hence why all the errors. Hell we're 3 seasons in and Mackenzie Davis hasn't even thought it a good idea to use her off time to learn to type correctly for the genius her character is. She's still one of the greatest minds in the computer world but she hunts and pecks.
I hate to be that guy but it's a show. It never claimed to be technically correct. It was always billed as a drama. Every show has errors even Silicon Valley and Mr. Robot. Some just have more than others.
Silicon Valley is a comedy about tech.
HCF is a drama set in a tech based world.
Hence why all the errors. Hell we're 3 seasons in and Mackenzie Davis hasn't even thought it a good idea to use her off time to learn to type correctly for the genius her character is. She's still one of the greatest minds in the computer world but she hunts and pecks.
2
u/chrisarchitect Aug 31 '16
(s03e03)
What do we have here?
16
u/Atari_Historian Aug 31 '16
He appears to be using the Gauss algorithm for finding Easter for any particular year. These kind of examples were popular in the day. Here is the general formula that he is using, but his dialect of BASIC is slightly different than this example (and some variables are ordered differently on each line). Otherwise, it matches line-for-line.
His BASIC environment isn't very great, because while it gives the error (one of the divide statements ends up with a number which is too large), it does not give a line number. I remember typing in a similar example as a child. It was pure magic in 1980.
5
u/[deleted] Aug 31 '16
He's faster typing than most of the programmers I know. He also has the ability to type concurrently, which places him above any auto-completion module on Earth (And he's just starting).
He may be a magician, after that trick with the box...
5
u/Ternarian Aug 31 '16
Is Joe running an Amiga 1000?
Seems like AmigaBasic is what Joe would be using to learn programming, although the producers probably thought a simple black screen with white text would read better.
5
u/a_few_flipperbabies Aug 31 '16
I just realized that I'm going to be very disappointed if I try holding HCF to the same technological accuracy & verisimilitude standards that I hold Mr. Robot to. Not that I don't still love the show (& have since season 1), of course!
0
u/[deleted] Aug 31 '16
[deleted] — view deleted comment