« first day (852 days earlier)      last day (3462 days later) » 

11:23
0
Q: Apply a function to either an element or a collection in Clojure

SebastianI have a small snippet of code that I use in some places in my program. It applies a function for secondary effects to either a single element or a collection. Given a function f, I initially wrote this: (if (coll? el) (doseq [e el] (f e)) (f e)) and later replaced it with this: (d...

Monking
Zak
Zak
YES!
I finally have some organised output from my project, and the numbers match the last Directors report exactly
Btw.: Consider my solution as a quick fix for your problem... I strongly encourage you to head over to codereview.stackexchange.com and ask for a review there. There is room for improvement in your code and I think you could learn a lot from a review. — dingalapadum just now
Before you do though, be sure that your code is already working as intended. Code that does not work is off-topic for Code Review. — Zak 56 secs ago
@Zak: The code compiles and runs if you put my proposed solution in there. I checked. But yes, as Zak says, make sure to post a working version of your code on codereview. — dingalapadum 52 secs ago
11:53
0
Q: Redundant null check

Nenad BulatovicI am cleaning some legacy code (not written by me); So I am wondering if I am correct about this (comments are mine): private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ArrayOfColumn)) return false; // Here i...

@CaptainObvious why is all legacy code ugly
Zak
Zak
@CaptainObvious is this not off-topic?
@Zak I don't think so, but OP could have laid out his question better
@ARedHerring because nobody loves it.
@RubberDuck cause/effect is the wrong way around there, I think
11:57
@Zak possibly unclear, but if he's maintaining it, he "owns" it. So, no. Not for the reason you think.
Zak
Zak
@ARedHerring As best I can tell, it's either asking for an explanation/confirmation of code, or not asking a question at all.
Greetings, Programs.
hey @Donald.McLean
12:19
Greetings User!
Monking!
12 hours ago, by rolfl
Will a mod humour me and post the 30-day flag stats?
@rolfl one of us (me!) were away for two weeks during that time ^^
@Zak sorry, I can't vote. How about a hammer instead?
Zak
Zak
@SimonAndréForsberg Hammers are always appreciated :)
12:31
0
Q: Event Handlers with if statements

rockyIam very new to the jquery, I would really appreciate if someone helps me out with my doubt. If we were to work with two different events that have to occurr in series.Can we use If condition to check whether an event has occurred or not. For example like to check if a click event ...

Zak
Zak
is this accurate?
Questions about specific Functions / Syntax / Bugs are more appropriate for Stack Overflow. Questions about how to design programs are more appropriate for Programmers.SEZak 2 mins ago
@Zak it is a very low-quality question. I wouldn't suggest it anywhere.
@SimonAndréForsberg That ^^
the guy needs to try some things out and learn event-handling in general.
Zak
Zak
@SimonAndréForsberg klkl
12:35
We can't stand it when SO pulls that stuff on us, so let's not do it the other way around either.
3
Zak
Zak
Noted for future reference
Before you know, one of their members will write a chat bot keeping them apprised of such suggestions.
2
Oh, wait...
Zak
Zak
I honestly doubt they'd notice the tiny increase among the tidal-wave of new questions
@Zak that doesn't mean it's okay
Zak
Zak
12:39
@ARedHerring sorry, that wasn't meant to justify sending crappy questions their way
no problem @Zak :-)
Zak
Zak
Just I doubt they'll be writing a chatbot to monitor us anytime soon
0
Q: Generation of Goovy source from parent Java class

Jacek CzPreface. Similar question without code was deleted on SO. I use groovy to write business rules into big Java (web,Wicket but this is not important) long term software. Use Groovy in object way, that is not as groovy Script, but every elementary groovy source override some Java API class. I.e. At...

@CaptainObvious that's brave
generating Groovy from Java.. not sure why you would want to do that exactly but shrug
@Mast I have considered having @Duga scan CR as well actually
12:48
@SimonAndréForsberg There's probably a use-case for it, but posting that information in The 2nd Monitor would probably not be too helpful.
Zak
Zak
@SimonAndréForsberg scan for what, exactly?
@Mast @Zak primarily scan for comments mentioning Programmers and post them in The Whiteboard. SO has too many rooms, and @Duga doesn't work for the SO chat domain yet.
I think that would be a good idea @SimonAndréForsberg .
Question has also been asked on CodeReview.StackExchange.com where it is on topic. — Jeroen 18 secs ago
@CaptainObvious Remember there's an R in Groovy?
2
12:56
@Quill the first version of that message was funnier
okay
1
Q: Euler_Project #1 Multiples of 3 and 5

Song KyungwooPython 2.7 Question link: https://projecteuler.net/problem=1 total_sum = 0 for i in range(1000): if (i%3 == 0 or i%5 == 0): total_sum = total_sum+i print total_sum I want to receive an advice for my code... Thank you in advance! :D

Zak
Zak
@CaptainObvious very little there to actually review, but seems like a legally valid question
13:12
1
Q: Euler_Project #11 Largest product in a grid

Song KyungwooPython2.7 Question link: https://projecteuler.net/problem=11 import numpy as np initial_max = 0 candidate_max1 = 1 candidate_max2 = 1 candidate_max3 = 1 S = {} S[1] = "08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08" S[2] = "49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 0...

@Quill Thanks for edition, english isn't my native language. I hope poor language isn't problem to understand idea :) — Jacek Cz 42 secs ago
No problem, happy to help :-) — Quill 12 secs ago
Good work @janos!
@Quill I just noticed it said Goovy. lol
thanks EB! actually, the "work" part really begins now ;)
2
@Heslacher thank you!
@IsmaelMiguel I still don't have Fanatic yet
you desrved it
@janos Well you've only earned it. :) I was disappointed you didn't get elected (I voted for you even).
yeay, thanks for that! :) Otherwise it might have been someone else to get it
did we lose an Off-Topic close reason?
Rachel Maleady on September 3, 2015
Learn all about Stack Overflow Web Developer Aurélien Gasser
13:21
is the connection to CR still really bad? or is it just me that has to post my chat more than once?
I don't have a problem
Zak
Zak
@Malachi Just you I think
@CaptainObvious The author is posting 'techical comments' in the comments ...
@Malachi I've had that issue many, many times. (still do)
dang
13:25
@RobSedgwick you can find it on Code Review, along with a totally overkill (but oh so fun to implement!) OOP rewrite (which performs better and looks cleaner, too). — Mat's Mug 9 secs ago
Can you use non-numeric line numbers? I believe line 99 should be FIZZ and 120 FIZZBUZZ. — Simon André Forsberg ♦ 48 mins ago
@SimonAndréForsberg nope
@Heslacher nice answer!
there's a bug though:
 6 DEF FN BUZZMOD(V) = V-INT(V/FIZZ%)*BUZZ%
 7 DEF FN FBMOD(V) = V-INT(V/FIZZ%)*FB%
It had been fun ;-)
fixed
@Mat'sMug ah damnit
20 years ago I had written a GUI with a keyboard-operator "cursor" (a sprite) that would open up drop-down menus from which you could list the files on a disquette, or launch a program, and IDK what else... thing is, I'm not sure I could rewrite that today, at least not without a lot of pain
that ^^
Zak
Zak
13:32
@Mat'sMug this all sounds like arcane magic of the highest order to me :)
@Zak nah, just lots of clever PRINT statements
@Mat'sMug And LOCATE too, right? ;)
no idea!
I remember QuickBASIC had LOCATE which would move the cursor to that (X,Y) on the screen.
ah
no such thing on Commodore 64
13:35
Aha, nifty.
QuickBasic != CBM-BASIC Version 2
@Heslacher I know that, just didn't know if C64 had anything like it.
@Mat'sMug sounds like there's plenty of other programs these days that can do that job :)
0
A: Simple number theory game, pt. 3

QuillA few things that you can improve on: alert: There's no need to declare alerts as variables as: You don't use them. They return nothing. Don't have long lines of text, seperate the sentences into lines, like the following: alert("Welcome to Zeros or Ones! " + "Both you and th...

IIRC I had defined the sprite with what amounts to ASCII-art with some DATA statements, then POKE'd 1's and 0's into some specific memory addresses that essentially amounts to flipping bits directly in the chip. I used to know what range was the screen memory and all.
wait, did @Malachi reach 20K? how did we let that happen?! ;-)
5
in other news..
> 69,000 users
12
13:43
to make it official (in chat)
congrats @Malachi!
2
My recruiter called today.
@EBrown what did he say?
@Malachi He hasn't called my references yet.
But, that's a good thing (or so he says).
I am waiting for mine to call with info from the last interview. I better get some coffee ....
bbl, gotta get things done at work
0
Q: Conversion of an array of integers to string

nowoxIn order to save memory space. Strings inside an embedded device are stored in a particular way. Each 32-bit location holds up to 4 chars instead of only 1 char in the usual case. I wrote a function that convert an encoded string back to its original string. I am new to Python, so I would like t...

@Quill I can't go there..... firewall
Zak
Zak
@Malachi amusing battle montage between your usual assortment of internet animals.
@Zak ...
13:55
lol
lol
@Mat'sMug thank you
did someone have my comment deleted? and the user's comment asking me why? to this question --> codereview.stackexchange.com/q/102669/18427 Why? Just Curious.
@Malachi What I'm saying is that it took to you almost 3 years to get 20k reputation
yeah...about that......look a Grasshopper... still no coffee
@Malachi it was flagged as rude/offensive, probably by OP. That was arguable, but I don't feel like arguing this morning, so I removed it and its reply.
14:04
I am very ADHD
@Mat'sMug okay
just saying
> I am cleaning some legacy code (not written by me);
In other news: I signed a paper today. Starting September 14th I will be a full-time employee at Sigma IT Consulting Sweden AB :)
8
> So I am wondering if I am correct about this (comments are mine)
@SimonAndréForsberg Congratulations!
@SimonAndréForsberg nice
Congrats!
Good aftermonking all
14:08
@SimonAndréForsberg Excellent work, sir! :)
@SimonAndréForsberg well done! congrats!
@SuperBiasedMan 'morning
@SimonAndréForsberg Congrats!
@SimonAndréForsberg Congrats!
In even more other news: I did have a job interview earlier this year, I didn't get the job but hey, I got a pretty nice job interview!
user image
3
14:10
I told my recruiter "I am curious if you wouldn’t be able to find other (comparable) options in Ohio, I’d ideally like to move back down there" and he emails me back, "well, in that case, pick a city and I'll see what I can find." I like this guy now. ;)
@SimonAndréForsberg That must have been fun. :)
it was.... a very intense day. I had 5 interviews in one day. Passed four of them.
One thing is certain about Google: Their interview process.... not as fast as their search engine.
7
@SimonAndréForsberg most big companies have long interview processes
I once applied to Riot games and it took 3 months before I got a reply saying "sorry, not interested"
Did you mean Riot Game?
I would've applied to Gearbox Australia, but they fired all their staff -_-
Put your code on Code Review, they'll help you out. — Cory Nelson 39 secs ago
14:13
@IsmaelMiguel no, I meant Riot Games.
(The people who made League of Legends)
What other games did they made?
@Quill Be happy, you dodged a bullet
It's a joke to say that's the only game they've made
@IsmaelMiguel Why? Gearbox are great
@IsmaelMiguel They havent'. It is their only game.
other than the whole mass layoff thing
@Quill They fired everybody. That's the bullet you dodged
14:15
However, to be fair, they support 30 million players and officiate every tournament for League (except amateur ones).
@ARedHerring Then it is Riot Game. (Sorry the bad joke)
I thought part of the description of a joke was that it was funny :p
2
@ARedHerring Shots fired.
@ARedHerring Hence the excuses. I think it was badly made and too cleaver.
you did really butcher it ;-)
14:16
don't be koi, guys.
@ARedHerring Small companies can be pretty slow too. I got a three month wait when I tried to apply for a summer internship between college years, then they wanted me to come for an interview right before I started back in college again
@SuperBiasedMan That's probably because you applied for an internship
@ARedHerring What's koi?
I would imagine people would place higher priority on placing permanent employees than internships
@IsmaelMiguel a koi is a type of fish. It's also a play on the word 'coy'.
@Quill I know. Next time I'll be careful
@ARedHerring I don't know what coy means
14:18
@ARedHerring Well it was an actual posting they put up, it wasn't just me speculatively asking.
@IsmaelMiguel synonym: flirtatious
Oh that's what you meant. It was a small enough company, I don't think they were hiring anyone else at the time.
> 1. (especially with reference to a woman) making a pretence of shyness or modesty which is intended to be alluring.
2. reluctant to give details about something regarded as sensitive.
(I meant the first part)
14:21
@SuperBiasedMan Ha, that reminded me of when I applied for and IT position at my college. 3 months later (and about a week from school starting), I get an email saying I have an interview tomorrow or the next day. And if I had gotten the job I would leave at the end of the week for training. Like, THANKS FOR GIVING ME TIME TO INFORM MY CURRENT EMPLOYER!
@IntensifierDescriptorMan in that case you respectfully ask them to wait for you to give notice.
If they decline, then they don't give a crap about your former employer and probably don't give a crap about you either
Bullet dodged
0
Q: multiple 0-1 knapsack type solution

bigmandanI had a problem similar to the 0-1 knapsack problem, only that I have multiple knapsacks (bins) of the same capacity. Given a set of items (pool) can another item be added to it and then be distributed among all or some of the bins. Some issue I think I might have: Naming things clearly and u...

@IntensifierDescriptorMan I think some people hate employee hunting the same way people hate job hunting and so it's just a procrastinated mess.
make your own game. get some friends together and start coding....lol
2
@Malachi friend? where can I download those?
3
14:28
@ARedHerring Tinder.
Same place you download a life
@EBrown not this again.
The day I find a programmer on tinder, the day pigs fly.
Zak
Zak
I'm all out of stars :(
Oh wait, american police already have helicopters.... I kid.
BTW.Home
@ARedHerring Oh I thought you meant any type of 'friend'.
14:28
@Zak: TS.
@ARedHerring Well, obviously @EBrown makes one
@Quill Just have to be in the Detroit area and you'll find me. ;)
Zak
Zak
@ARedHerring law of large numbers, there's bound to be at least a few on there, somewhere, for some values of "few", "somewhere", and "programmer"
@Zak For some values of "some."
@FUZxxl I was inspired to try writing a shell built-in dirname and put it on codereview.stackexchange. I looked but couldn't find any good test data (other than in the spec link to test it with). — Etan Reisner 28 secs ago
14:36
Advice: don't eat mentos and drink cold water after
the same thing applies to brushing your teeth and ice water
That doesn't make much difference
Worst is to brush your teeth and drink a beer or lemon ice tea after
Or eat something sweet and drink beer after
Zak
Zak
or something spicy
Yeah, or something spicy
You don't know but around 1 month and a half ago
I bought the spicyest pizza I could find
I haven't been this excited in a long time...
14:44
With the spicyest sauce I could find
And I poured the sauce all in a single slice
And ate it all
spoiler: he burnt it
2
No, the pizza wasn't cooked by me
But I burnt my mouth and I promised I would never do that again
No, he let someone else burn it for him.
Zak
Zak
When I (briefly) worked in a commercial kitchen, I managed to get Jalapeño juice in an open cut. It was Nasty.
Well. I missed my train. Crap.
@Zak. Ouch
14:46
@Zak I've never done something that painful.
But once, I had the cool idea to open some green piri-piri peppers (don't know the name)
With my hands, and rubbed my hands on my face and nose
2000 rows is not a lot. In any case, with specific full working code you can post to Code Review and ask for optimizations... otherwise it's a bit hard to give suggestions. — SpaceSteak 49 secs ago
@Heslacher Not exactly my interests, but I've seen it is a good answer and voted as equal. I even made a new account for that!
I made an account for answering the question ;-)
Nice!
Well-deserved badge then
14:49
thanks
Zak
Zak
@IsmaelMiguel There was also the time I got 2nd degree burns all up my right arm. That wasn't much fun either.
@Zak And that's why I stay away from stoves. I was sharing house with another guy and he dropped oil at 180ºc all over his arm, belly and leg
Zak
Zak
I think that was about when I decided to quit
@IsmaelMiguel I cringed just reading that
I freaked out when I saw that.
But don't worry
When I was 5, my mother threw a fish from the frying pan right into my face, so, just nightmare fuel
Zak
Zak
Thanks @Santa
15:06
@Zak No problem my child.
@Zak could have been worse. ever had a habanero?
Zak
Zak
@Mat'sMug nope
Jalapeno is mild ;-)
@Mat'sMug I thought that last one said "Sweet Balls."
Obviously I'm tired today.
@Mat'sMug You should watch Good Mythical Morning. They eat lots of things. Including spicy things
15:11
At least it was not sweat,
@rolfl Ew
@IsmaelMiguel ^^
@EBrown My hoven only goes to 240ºc
See my answer to a very similar question for a shorter, faster way to do this. — Edward 34 mins ago
...except it's pretty damn hard to follow
(almost bordering golfed)
But that answer is quite old too
But I agree
If instead of V, H and what-not it had real decent names, it would be a great answer
15:46
My god. My local council is incredibly inept
Why's that?
I knew that was you, Dan.
about a month ago they introduced wheelie bins (before that everyone left their black bags out on the side to be collected). All rubbish on that day was not collected. We only get collections every 2 weeks, so 2 weeks later the rubbish is still there; I got given a notice saying "no side waste or you'll be fined"
so, I contacted my council and explained that it had not been collected, and we only had 1 wheelie bin between 3 flats and had to fit 6 full black bags in it.. that's not going to happen.. they said, fine, leave it out on the wednesday and we'll collect it, no legal action taken. Also we'll get you 2 extra wheelie bins (one for each flat)
15:48
They trolled you!
So, I get home - 2 weeks after the collection where they told me to take all the rubbish out and they would collect it with no legal repercussions
to find I've been served a £100 fixed penalty notice for leaving rubbish out on the side..
LOL!!!
MASTER TROLL PLAN WORKED!!!
Seriously
I would freak out with them
I've contacted them and they've said they won't make me pay it but seriously, wtf. That notice should not have even been sent out in the first place.
@EBrown It's the same identicon, so I don't know how you wouldn't know it was me :P
And where's the 2 extra bins?
@ARedHerring I'm almost entirely blind in one eye...lol
15:50
Apparently the same place where the council's sense is
In the wind
@EBrown oh, I apologise
I though it was "nowhere"
@ARedHerring No need, you can't actually tell that from looking at me.
@IsmaelMiguel that's what "in the wind" means
Oh
Sorry, my brain is in the wind today. With some strong headaches
Oh no. Images won't load on this app anymore. :(
It's completely useless now.
15:53
user image
6
Too bad yo ucan't see that, because that's hilarious
Even I found that funny!
3
Took me a moment, but that ^^^^
@Mat'sMug Habanero Peppers are good, YUM
LOL
2
@ARedHerring Took me a second to compute
that is funny
15:55
@EBrown Which app do you use ?
Zak
Zak
my rep gain has slowed down considerably the last couple of days, need to go find some more questions to answer :)
You can start by accepting answers
2
You have 4 questions with unaccepted answers, I only recommend accepting on the 3 oldest ones

« first day (852 days earlier)      last day (3462 days later) »