« first day (193 days earlier)      last day (1031 days later) » 

10:25
@NathanMerrill (cc @El'endiaStarman) I just remembered this beautiful(?) exception abuse someone wrote for our BSc thesis project to peek at the second value on a stack:
try {
    x = pop();
    return peek();
} catch {
    throw new StackEmptyException();
} finally {
    push(x);
}
I think the function may have assumed that the stack had at least one element or handled completely empty stacks some other way, but the return inside the try is amazing :D
 
3 hours later…
13:23
@MartinEnder I think that wouldn't work in Python because x wouldn't be pushed back onto the stack after returning.
ah okay. it does work in C#.
according to the Python docs "The finally clause is also executed “on the way out” when any other clause of the try statement is left via a break, continue or return statement."
you can even override the return value from try by returning something else from finally
same behaviour in Python 3
13:52
Woah, did not know that feature.
CMC: given a classification number of a math subject, return the name of the subject: ams.org/mathscinet/msc/pdfs/classifications2010.pdf
@MartinEnder wait, how does that work? If pop() throws an error (because the stack is empty), the finally will fail because x doesn't exist
I'm going to guess that the x = pop() is before the try statement
@flawr Seems like that would be hard to compress.
4 hours ago, by Martin Ender
I think the function may have assumed that the stack had at least one element or handled completely empty stacks some other way, but the return inside the try is amazing :D
oh, I missed that statement :P
I sympathize - reading is hard.
14:09
I'd love to see a study somewhere that compares languages as a first language
like, have four different datasets: python, c++, java, and haskell
then look at their drop-off rate, grades, and post-schooling salary
I can't say whether PHP or Delphi was my first language but I actually tried learning C and Java before those (unsuccessfully)
was that due to the language, the experience level, or the teaching method?
(You may not know: I hardly remember much of my first programming years)
I also learned Delphi before PHP but didn't as much get the hang of it at the time and I don't think I ever wrote any fun projects on my own in Delphi (only school stuff) whereas I picked up PHP very quickly and started writing simple but dynamic websites with it.
I remember making a maze game and hardcoding in a maze. My dad suggested generating the maze and I thought that he was crazy.
it seemed so impossible back then
@NathanMerrill in case of C it was the teaching method vs my age. With Java I think I actually had a better grasp on it, working through a book for kids but then didn't really know what to program afterwards and stopped.
So at the time I learned PHP I was already familiar with basic control flow and stuff and actually having an achievable goal really helped there.
14:18
we do agree on one point: we both need to have fun to really start learning a language :P
I technically learned C++ and Java first, in that order. I didn't stick with them though. TI-BASIC was when I really started producing multiple programs, and then I learned BlitzBasic from a book called Game Programming for Teens (thanks to my parents), and then Python a year later (thanks to my brother).
I think the big thing for me was to have fewer obstacles between coding and seeing the result. You had to compile C++ and Java had a lot of (what seemed to be at the time) strange, unnecessary syntax.
@El'endiaStarman I should have mentioned: my maze game was in TI-BASIC. My program would generate the 9? different possible views using lines and dots, and then save them as screenshots. Then as you moved through the maze, I'd simply show the right screenshot
What I find interesting is that these days I have no bias towards the languages I learned first (part of which might be that in hindsight they aren't the greatest languages, I guess)
@NathanMerrill That's really cool.
@El'endiaStarman "what seemed to be at the time"... wait what? :D
14:20
I never actually finished it. I always got distracted by something new
@MartinEnder Excellent, another Java hater! (I'm kidding.)
But seriously, when you're totally new to programming, it's hard to know why you need public static void main() as the first line.
or why you could use public static int main() instead if you want
or pass in String[] args
oh yeah that's true. I had similar problems with learning Java and Delphi. the other issue is that the way I was taught these was via IDEs and by writing GUI programs, where you end up clicking together some stuff and just fill in some callbacks and then you have no clue what on earth all the code around that does, nor how you actually work with a command line
I really wish they'd stop teaching Java with GUI programs
In fact, I'd be totally ok if they dropped GUI support altogether
I think one of the most useful TI-BASIC programs I wrote was one that calculated equilibrium coefficients for chemical reactions. I remember being quite proud that I figured out I could use the bisection method to find a zero of an equivalent polynomial (well, polynomial-ish).
14:26
I don't think I'd use Java at all to teach someone programming to be honest
Me neither. Python all the way.
I totally would. But I really enjoy Java :)
I really enjoy C# but I wouldn't use that either
nor any other static language for that matter
which language specifically depends on the person I'm teaching, but in most cases it would be Python or JavaScript
(mostly depending on what they wanna do with their programming skills and how intrinsically motivated they are to be happy with coding CLI programs)
yeah, javascript has a huge boon of giving immediate feedback in GUI format
that said, if you do try to get them to use the GUI there's going to be a bunch of "framework" that they have to use but not understand
Oh, that's right, JavaScript is another good starter language. I've actually kinda started teaching my best friend programming in JavaScript. He's a very visual person, and when you can plop D3.js into JSFiddle and use the collaboration feature, that's great for learning.
14:31
oh! I posted this game on TNB, but I think its fantastic:
I wonder if any of the popular programming puzzle games are actually good for teaching programming. I always get the impression they'd be way too daunting for people without prior programming skills and are actually aimed at programmers instead.
it looks like a puzzle game until you realize its actually programming concepts
ninja'd...
:P
I don't think its good at teaching programming, though
you don't actually code
yeah, that's the thing. spacechem might be accessible for people with a knack for puzzles but without programming skills but it doesn't really teach programming (although I guess the mindset helps). but then stuff like TIS-100 or Shenzhen I/O is way over the top for someone without programming skills. don't know about HRM, but it's probably too hard as well.
@NathanMerrill oh wow this is quickly reaching functional-programming difficulty level
14:37
@MartinEnder did they just convert a piece on you?
I didn't understand those green sparkles at first
but its a cool idea: take what you've already used, and simply show it in a different, more functional way
I meant the two levels before the sparkles but yeah I have no clue what the sparkles mean
none of the levels are particularly difficult IMO. I did get stuck a couple times, but its not like some puzzle games we've talked about before :)
@NathanMerrill Very interesting.
I think that the ideal programming game would look like:
1. You have a robot in an environment with obstacles. Maybe a score counter in the top left.
2. You can type commands in the left to make the robot move.
3. There's a reference book that lists all of the commands you can use
a key part is that you don't tell them what to do though
because so much of programming is research and exploration
Weird, them converting the pieces actually makes it harder for me to reason through the puzzle.
14:47
I'm going through it again: puzzle 20 is a good one :)
I'm on #39 now... >_>
heh #38
Ooooh bag of holding.
14:50
Yeah, this is most definitely functional programming.
level #47 was a "reveal" that, for some reason I didn't expect
and then I was like "duh, how did I not see that"
With the keys?
I wonder whether the #51 solution is unique
eh weird, why is the bag ordered now...
@MartinEnder did you end up with a bag of 4 elements?
14:54
Well, the bag always had identical items in it, so ordering didn't matter.
Woah, maps.
@El'endiaStarman true, but it was a bag, so I expected it to be unordered :D
Yeah, me too. :P
@NathanMerrill I think I had three bags, one empty, two with two elements
then yeah, not unique
the bags are ordered, even though it doesn't look like it
oh right, you can also put 4 in one and equate to empty ones
or 2, 1, 1
14:56
I put 4 in one, and then triplicated it
I think I used one bag and two stars.
oh that also works
okay, lots of solutions there...
heh, #61 was neat
that one is effectively unique
14:58
Ack, you're ahead of me now.
Yeah, I agree that one's neat.
what's the point of 71?
no idea
I also thought that the conversion from the star symbol to the word is silly
I was kind of hoping they'd convert it to numbers of something
yeah agreed
anyway, done
the concept of this was really nice, but the actual puzzles could be improved a lot (and taken further)
yeah. I'd love some harder puzzles
thanks for sharing it :)
15:03
I'm done as well. I like how they brought it full circle to one star, just like the first puzzle.
Agreed!
@El'endiaStarman ...I didn't notice that. I wonder if that was actually intentional
have you guys seen/played this one? alexnisnevich.github.io/untrusted (this is actual JS programming though and definitely not suitable for learning programming... I don't think I ever did more than a handful of levels so I don't really know where it's going)
Oh yeah, I think I've played that one.
do you remember how long it was/whether it's worth playing the entire thing?
I also found this in my bookmarks which apparently is specifically aimed at teaching programming: codecombat.com
...that had better not be an mmo
the last thing you want is students fighting/greifing each other.
15:12
"includes both single-player and multi-player components"
IIRC you can actually choose what (real-world) programming language the game is in
"Courses are available in JavaScript and Python. Web Development courses utilize HTML, CSS, jQuery, and Bootstrap."
ah, just python and javascript apparently. either they dropped some or I'm confusing it with another similar game, because I remember some (lesser known) functional language being available
I used to tutor on a site called codehs.com
It was javascript-based, and you basically moved a dog around a maze.
But like other sites, it had the problem of telling you what to do
however, I did like the tutor system: You'd look over student's code, and critique it
 
1 hour later…
16:45
In case I'll ever have kids, can I hire you three as teachers? =P
17:16
Any of you guys use math sites besides math.SE?
does google count? I frequently use the omnibar as my calculator :)
and oeis and wolframalpha
I mean a site/forum where you can ask and answer questions
4
Q: The things that make math.SE 'better' (or worse) than most other math sites

Simply Beautiful ArtSo there was a recent conversation below the main post of When does the series converge?, which prompted this meta post. I know there are plenty of people who are for and against the closure and voting of others on questions that are of the general form: So the problem I've been facing... ...

@NathanMerrill and mathworld
(doesn't answer the question either though)
17:18
never used mathworld
but I do know that wolfram alpha is pretty good at answering my questions
mathworld is the thing you get when you ask for the definitions of particular things when doing things in WA
oh! I do use that
it's easily my favorite place to find a definition of something
maybe second to wikipedia in some cases
but the majority of my math questions make it here (in this chat)
and if it sparks enough discussion, then sometimes the math site
@SimplyBeautifulArt I have used some german forums in the past
17:30
wait, math still exists in german?
Speaking of math.SE, I was disappointed this never got any responses
(I was looking at all my old questions. One of them I don't remember writing at all, nor what prompted it)
@NathanMerrill yep, and so does german, afaik:)
 
3 hours later…
21:22
Anyone know a good place for writing math blogs?
21:34
@MartinEnder Jeez, you nerd-sniped me hard with that one.
I've definitely played it before, but it was still pretty challenging.
21:46
I'm temporarily immune to that particular nerd-snipe. A few months of working on a JS KotH controller has left me with the uncanny ability to look at broken JS code and not feel compelled to fix it.
Haha=)
^ is there a puzzle solver like BurrTools but for Blender? :)
@flawr That makes me think of 3d mazes
Well it is just another idea for a burr puzzle
lets ask blender.SE
@El'endiaStarman posted a question
22:07
> the design, manipulation and ...
Is there a word missing? I can't edit as I can't guess what it is
Oh yes, there is.
23:15
In case you haven't wasted enough of your time today, I recommend the app/game Red Herring. You have a list of words, and you have to identify the categories the words fit under
The app name comes from the fact that some of the words are red herrings: they don't fit in any of the categories
23:57
@NathanMerrill nice question, i answered it

« first day (193 days earlier)      last day (1031 days later) »