« first day (861 days earlier)      last day (3148 days later) » 

5:05 PM
Was having dinner... reading up
@itsbruce But a good way to put it in practice would be to build something using real tools
@itsbruce It helped me to dive deep into Java and trying to understand the whole language... Unfortunately, that's not the case with many students
@Hosch250 Don't know if it is on scope for them though
 
5:18 PM
@skiwi Of course. But they learn s = d / t first
@skiwi Me too. I guess that makes us both hackers in the old sense - people who always want to learn everything about a system they have to work with.
But it's very ironic that a teaching philosophy which claims to make the subject accessible to all actually only benefits the few
 
I think it's more weird that we don't really get taught anything useful in the course, this might be overly generalized
But you are in the correct place if you want to go for a PhD or anything, that I can understand, but most will end up in the industry anyways and they are not really well prepared for that
Even worse, if you choose to not continue CS/programming, you don't have many skills, while most programmers are skillful in other things like modeling, construction, engineering, etc.
I even wanted to be an architect before I decided to focus on programming
 
Is @Mast around today?
 
@SimonForsberg He popped in earlier
 
hmm..
7 hours since my answer on a bountied question...
reactions?
0
A: Listens for custom messages on the production Bitcoin blockchain

Vogel612The first thing I want to talk about is: while (true) { try { String message = messageQueue.takeMessage(); This loop smells. Instead of using your custom class delegating to BlockingQueue, your messages can be handled by standard java library classes. Al...

 
0
Q: Selectable Clickable Images

CashmerellaSo, what I'm trying to do here is make a clicker game. I want the enemy to be selectable from a dropdown list, and then you can click whichever enemy you select to add to your resources (of which there are four for this game). However, when I use this code, the clickable images won't show up. Is ...

 
5:26 PM
@Vogel612 Leave a comment on the question asking what specific features of an answer would satisfy the bounty
@skiwi I've recruited a lot of software engineers. I can tell you that CS qualifications are largely seen as useless in the industry. But not because of a lack of practical basics, really
Much more of a problem that CS courses don't seem to teach DRY, separation of concerns etc.
 
Ever seen academic code? ;)
 
Oh yes. That's why I dropped out.
 
Bonus points if it's written in Python, though that may be LISP in your time?
 
I'm not that old. Pascal was more common in British universities when I was learning.
I'm too old to be offended, though ;)
 
Haha :P
 
5:34 PM
If you come out knowing how to actually use polymorphism (since it's an OO based study) and not just dump everything in util classes, you'll be way ahead of the crowd.
 
@itsbruce is polymorphism id :: a -> a, general types?
 
@skiwi They have a tag.
It should be on topic.
 
@itsbruce reading wikipedia about it now
From wikipedia it looks like everything is polymorphic in dynamic languages: > Parametric polymorphism: when code is written without mention of any specific type and thus can be used transparently with any number of new types.
 
@RubberDuck You might find this helpful: programmers.stackexchange.com/questions/195995/…
 
@Caridorc In the OO context, it mostly means subtyping and interfaces
 
5:44 PM
@itsbruce but if I code a function when the arg only needs to have implemented the, say, __iter__ special method, than any type with it, including user defined ones are ok
 
@Caridorc Yes, duck typing is a kind of polymorphism
 
Also when in Haskell I do like f :: Eq a => a -> b where a may be anything, just I must be able to decide when it is equal to other things
 
@Caridorc Yes. That's ad-hoc polymorphism
 
@itsbruce I know imperative and a bit of functional, OO never really appealed me, it looks so verbose
 
I'm an FP guy, but to be fair OO doesn't have to be verbose
 
5:48 PM
@itsbruce hello world in java really threw me of from learning it when I was deciding from which language to start
 
Java makes it verbose, but that's its design and constraints, not a natural feature of OO
 
@itsbruce could you suggest a succint OO language so I can give it a try?
 
Succinct? Io
Be warned, it used prototype inheritance, not class inheritance
 
@itsbruce objects are objects, I will read into it, thanks
 
You might want to try 7 languages in 7 days
 
5:54 PM
@itsbruce so Io has the same OO system as Javascript, based on prototypes
 
Yes, but without all the verbose cruft and without the misfeatures
 
In the above code, "for" and "if" are just normal messages, not special forms or keywords.
 
Io is very similar to smalltalk like that
tldr; Alan Kay regrets calling it "Object Oriented" and wishes people didn't get hung up on classes. It's all about the messages.
 
@itsbruce any ideas about how to install it? sudo apt-get install io does not work, I downloaded a zip from github but I am stomped
 
6:08 PM
@itsbruce could you suggest one simpler to install :) low quality package, installing it may seriously damage your computer
@itsbruce it worked
installed
 
Use at your own risk ;)
 
1
Q: Simple console snake game in Python

curiousHere's a simple snake game I implemented in Python, which works in a console. It's not complete yet (doesn't generate food yet, and no scoring or difficulty levels), but it works. I would be really grateful if you give me any suggestions on how I can improve my code. Note that I did some of the t...

 
@Caridorc since you've been learning Haskell, you might be interested to know it's easy to implement laziness in Io. viewsourcecode.org/why/hackety.org/2008/01/10/…
 
@itsbruce I will play around with the basics for now, that looks more advanced
 
Lovely, simple language. Unusually for that kind of language, actually possible to do practical things in it.
 
6:19 PM
yes in Io: loop ("yes" printl)
 
Thanks @Hosch250, but that guys asking if he should. We know we should, but no one is acting on it. workplace.stackexchange.com/q/54334/26114
 
@Caridorc And loop is just a lobby method, not a keyword.
 
0
Q: The median of the given AVL tree

Maksim DmitrievA long time ago I found this question and asked about an algorithm here. My code is also available on GitHub. Given a self-balancing tree (AVL), code a method that returns the median. (Median: the numerical value separating the higher half of a data sample from the lower half. Examp...

 
@itsbruce what are the special keywords in this language? I have troube finding them
 
Io has no keywords and no statements
Everything is done with messages
Which of course means you can override loop locally. And for anything which inherits from the object in which you do that.
 
6:31 PM
@itsbruce any thoughts on my FizzBuzz in Io? codereview.stackexchange.com/questions/104526/…
 
I don't think there's a language in which it's easier to write DSL's than Io
@Caridorc It works just as well as your Haskell answer the other day
 
@itsbruce I know, but I did not feel like over complicating it.
Efficiency does not matter
 
Sure :)
 
@itsbruce does mutation exist in io?
 
There are ways to do a forward-iterating version in Io. Several. Some of them are even fun. But that's a longer project.
@Caridorc Yes. You can update slots.
So it's a language you can dynamically rewrite.
 
6:38 PM
@itsbruce good info, dinner time now, see you soon
 
I know Saturday is a slow day, but any further chat along this line we should take to another room ;)
 
0
Q: Who wants a FizzBuzz? Io

CaridorcI have been playing around with the Io language, and this is my second toy, after the yes program that is just loop ("yes" printl) and on which not much review is possible, I wrote a FizzBuzz program. I like the shortness of it, but any improvement is welcome as I am very beginner in this program...

 
@Abizern The OP has now stated that this is "example code", which makes it likely to be closed on Code Review. Have you read A Guide to Code Review for Stack Overflow users? — Simon Forsberg 48 secs ago
 
Later, folks
 
Have a nice day @itsbruce
 
6:46 PM
Later
@CaptainObvious Here we go again ;)
   #######  ##     #     ##     #    ##  #######
   #        # #    #    #  #    #   ##   #
   #        #  #   #   #    #   #  ##    #
   #######  #   #  #  ########  ####     #####
         #  #    # #  #      #  #  ##    #
         #  #     ##  #      #  #   ##   #
   #######  #      #  #      #  #    ##  #######

   #*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*#
   # A simple command line snake game in Python. #
   #*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*#

########################################################
wut
 
Interesting.
I like ASCII art, but I'm not the best at it.
 
@itsbruce we may talk at Io -- Succint object oriented programming to avoid polluting the main chatRoom
 
@Hosch250 I like ASCII art as much as the next guy, but I don't think it belongs inside source code (usually)
 
Unless you are printing it.
And usually I kolmogrov-complexitize it.
 
7:01 PM
You what?
 
I compress it into as few bytes as possible.
Kolmogrov complexity problems.
 
@RubberDuck @skiwi first draft, please let me know what you think: documentup.com/janosgyerik/code-reviews-in-practice
2
 
@janos Okay!
> My goal with this document is to become a handbook
3
Is your goal to become a handbook? ;-)
 
> My goal is for this document to ...
 
ugh, ok, fixing... thanks!
 
7:06 PM
Is code review normally conducted against a whole changeset rather than each individual commit?
 
English is hard
changeset
 
Okay, interesting, I have no experience with it though; My only experience I have is when I work with multiple people on a project to keep up with reading their individual commits to see if stuff makes sense
Another thing I see in practice often is that incomplete commits get pushed so that a coworker can work on them? While it may not be in the scope of the document, how do you deal with that?
> Be patient and calm, keep pushing, inching forward step by step.
Made me lol
 
@skiwi I assume that happened early in the project?
in the beginning, a project may be in a flux
while it's in a flux, the workflow may not be practical
I should add a section for such exceptions
in a stable project, such commits and working style should be avoided
 
@janos Not neccessarilly, it can happen any time on feature branches
 
if somebody needs your branch halfway through, then maybe the branch is doing too much, and should have been split into two
"incomplete commit" sounds like broken or untested build
 
7:15 PM
It can also be the case that one person doesn't know a satisfying solution, but knows the other person knows one
@janos Exactly
 
broken/untested builds are not acceptable
if you need help, you can push your branch, and ask for an early review
 
I think the mindset of broken/untested builds works together with thinking you own a branch and then being able to hand it off to someone else
 
this hasn't come up in practice yet. Even the juniors are able to finish their tasks alone without handing off to somebody else.
I also never needed to educate anybody about broken builds
it might be a thankful leftover from subversion days: there if a commit broke the build, that affected a lot of people, so they naturally learned to not commit broken code
 
I see it happen at Cardshifter occasionally :P
Another thing would be if you are using TDD, and if you want to commit the tests, then your build will be broken
Or is annotating the tests with @Ignore enough to mark that commit as good?
 
No, because until all tests pass, the API may still change a lot, so I would ask to complete those tests first. The branch looks unfinished with tests marked ignored
 
7:29 PM
1
Q: Using BubbleSort to sort numbers into ascending & descending order

James ZafarI have created a simple implementation of the Bubble sort algorithm. I have tried to make it as efficient as possible by following pseudocode which I have provided below, making some slight modifications to suit my needs. The Pseudo code: procedure bubbleSort( A : list of sortable items ) n...

 
7:49 PM
For a minute I thought there was some hope to PPCG:
1
Q: Python Code Reviewer

marshTask Your mission is to create a program that reviews Python code. The solution can be written in any language! It must take input that contains python code. The program must add # This is not pythonic! before each block of non-whitespace lines. Input The data can be entered via stdin. The d...

 
Misleading eh
Should be called "Python Code Comment-adder"
 
0
Q: Aggregate sum by month

kxyzI have JSON data: var data = [ { dat: 'timestamp', val: 10 }, { dat: 'timestamp', val: 20}, (...)] Data contains objects with timestamp and value, can be more than one in month. I need to sum values from objects which have the same month and year. First I use each function to add additiona...

 
8:40 PM
If anyone is interested to test it, @Phrancis will post details for how to play shortly as soon as @bazola updates his server.
 
0
Q: Reduce jQuery append operation

Jrags87Is this the simplest way to write this? This code evaluates if a textbox value exceeds 20 characters, and then displays the proper message (essentially truncating the string and then adding an ellipses to the end.) I've tried using a tertiary operator but doesn't seem to work with appending data...

 
9:00 PM
0
A: Submit an array as html form value using JavaScript

FlambinoFirst of all, I'd make sure that supporting IE7 is actually required. It's a really old browser by now, and there are a lot of things that are much more difficult to do. Anyway, as for sending multiple form values, there's a common - but informal - way of doing that without JSON. It's supported ...

 
@janos This
 
9:13 PM
Maybe the question was better be asked at Code Review then. But it's OK. — Bergi 19 secs ago
 
 
1 hour later…
10:37 PM
0
Q: Task Reminder - Repeatedly notify every 6 hours

SuperBiasedManSo I'm very much a beginner to Java and Android programming. I've worked a lot more with Python so I might have some quirks from there bleeding into my code here. I'd like a particular focus on pointing out ways I'm approaching the language and any confusing style I might be employing. What the...

 
11:00 PM
 
And since when is no whitespace lines good Python?
(Except when golfing, of course.)
 
possible answer invalidation by Jrags87 on question by Jrags87: codereview.stackexchange.com/posts/104532/revisions
 

« first day (861 days earlier)      last day (3148 days later) »