« first day (942 days earlier)      last day (3074 days later) » 

10:00 PM
I need to start working with async/await more.
 
0
A: Twitter Bootstrap CMS

mvbrakelWell looking at this as a code review of the code you posted i can recommend a couple of things; Security The major flaw at the moment is the possibility for SQL injection. You put the $_GET values directly into the query without validation or escaping. PHP.net has a page on SQL injection: h...

 
@EBrown Pinning time!
 
@SimonForsberg LOL :)
 
@Mast If all goes well then I will do some commits on it tomorrow as well.
 
-2
Q: best way to clean / optimize this javascript code

YourConsciousvar elem = document.getElementById('item1'), // var elem2 = document.getElementById('item2'), checkBox = document.getElementById('check1'); checkBox.checked = false; checkBox.onchange = function() { // elem.style.display = this.checked ? 'block' : 'block'; ...

 
10:01 PM
Unfortunately(?) I didn't do any actual BF development today, been wanting to review that latest BF question.
 
Ooh, @EthanBierlein your game dev question was protected
 
Yeah I saw.
That question really tempted me to play some skyrim
 
@CaptainObvious That's a lot of needless repetition.
@DanPantry Feeling up for some free points?
 
@CaptainObvious ;-; I can't see deleted questions anymore...
 
I found I very beginner Haskell zombie and killed it! Yeah
0
A: Extract logic applied in a sequence of integers

CaridorcI managed to simplify a pair of your functions: countDelta countDelta = map (\(x:xs) -> (length xs + 1, x)) In fact most of the logic in your countDelta was just reinventing map, so actually using map makes it much easier. ShowTuples (You named it printTuples but it does not print the tupl...

 
10:06 PM
@Caridorc Murder at it's finest.
I must admit, looks pretty cool.
 
@EBrown Haskell is very cool, but also very hard
 
@Caridorc I can totally see that.
So, soon to come: blog post on why optimizing basic arithmetic in programming is sometimes necessary.
(And often offers performance benefits, if done properly.)
 
@EBrown you mean using bitshifts?
 
@Caridorc Nope.
double result = n / Math.PI; is slower in many languages than double piRecip = 1 / Math.PI; double result = n * piRecip;
Precalculate division as much as you can is basically the moral.
 
It looks pretty micro
 
10:11 PM
It is, but if you're doing a lot of it, it adds up quick.
 
I can totally see people using that in loops running millions of times per second though
 
Division is (on some CPU's) double the execution time of multiplication.
@Caridorc Exactly.
Similarly if (x == 1) { /* ... */ } else if (x == 2) { /* ... */ } is often technically slower than switch (x) { case 1: /* ... */ break; case 2: /* ... */ break; } when there are many conditions.
 
@Zak that's what I thought too
 
@EBrown good night everyone :)
 
@Hosch250 I am going with CTU, looks pretty reputable.
 
10:19 PM
@Caridorc G'night. :)
 
Zak
@Malachi Like, I have 1 year of a Maths degree, which is currently paused while I'm working, and honestly, I learn far more, far faster, and far more valuable things in my current job than I ever did at Uni.
2
Though admittedly, most jobs are not like my job.
 
I have tools that I got from school, and experience from jobs I have worked
TTE
 
@Zak I've learned a whole lot at my job, too.
I've learned more than I care to admit, but it's valuable knowledge.
It's taught me a lot of problem solving.
 
soo... I learned a lot at Uni...
just saying
 
I would say I learned more at work than I did at Uni. But, I never finished Uni.
So there's some bias there.
 
10:27 PM
I agree to "learned more at work", but it's interesting how University places all the nice foundations below what I learned until now.
 
Uni taught me some of the optimization techniques I use.
 
Zak
Uni taught me nothing about programming :) But then again, I did do a Maths degree
@Mat'sMug that VBA web scraper is some of the best VBA code I've seen for review in quite a while.
 
I got an Electronics Engineering degree. My current project has little to do with electronics and in my spare time I program in more languages than I care to count.
I learned C, C++ and VHDL in college, the rest is self taught.
 
I actually learned some Java and C++ in Uni (not much but still some).
 
Zak
I've always been something of a polyglot. I'm interested in systems and figuring out how they work. That's led me into Maths and Statistics and Finance and Economics and Politics and Sociology and Psychology and Anthropology and Computer Science and Programming
IIRC, I considered doing about 12 different degree subjects
 
10:34 PM
If your code works and you want an external point of view, you should go on Code Review. — A.L 39 secs ago
I'm voting to close this question as off-topic because there is a dedicated website for Code Review : codereview.stackexchange.com/tourA.L 22 secs ago
 
@Duga Invalid.
 
@A.L No. Among others: OP is not sure about whether his code is correct. Code needs to work on Code Review. — Mast 45 secs ago
 
Zak
Hello new people
 
TTGTB, got way too late this morning.
 
Zak
This is a solid piece of code that deserves more upvotes
5
Q: Web Scraping with VBA

ForrestAI wrote this to scrape album review data from AOTY into a spreadsheet. Check it out and let me know what I could've done better. Option Explicit Const classAlbum As String = "listLargeTitle" Const classScore As String = "listScoreContainer" Const classRating As String = "listScoreValueContainer...

 
10:45 PM
@Zak nested loop...
variables could be declared closer to usage
 
Zak
@Mat'sMug I thought that too, then noticed the loop.
I assume declaring variables inside a loop is not a good idea?
 
makes no difference, the smallest scope is procedure-level
and yeah, usually it's not
but consider the Do...Loop body as its own method - any harm in declaring all the Set objects inside that method?
 
Zak
I thought you just said declaring variables inside a loop is a bad idea?
 
usually
because it's confusing
but if you extract a method from the do...loop body, what's confusing about having these objects scoped to that extracted method?
they're re-set at every iteration anyway
that said the IE object shouldn't need to be recreated at every iteration
I might write up an answer later tonight
TTQW
 
Phew. Just made a very thorough bug report, and ended up staying over time as a result. My brain is mush now.
At least there's a benefit to having a huge amount of logging :)
 
11:03 PM
:P
Logging is good.
 
I still think passing multiple values from SQL to a C# method as a comma-separated string is a terrible idea.
 
It is.
 
Sorry mast in bed
UK just approved air strikes in Syria. Okay.
 
@DanPantry To the Nth. :P
 
And just to make it better, the string is kept as comma-separated values all the way into what the method does with it, instead of say putting them into a list at the beginning. And as I found out, if the string has no values, fatal error on the application.
 
11:06 PM
I'd discuss in nth but phone doesn't let me see other chat rooms
 
@Phrancis Oh wow.
 
What is this Nth?
 
@DanPantry Time for you to join the military, then.
 
I know it's a chatroom
 

 The Nth Monitor

Conversations that don't quite fit in The 2nd Monitor
 
11:07 PM
No, I'm not serious
 
@EBrown Tell me about it
 
@Hosch250 but he'll have to get a haircut :P
5
 
Ah
@Phrancis Thanks!
 
np
 
@Phrancis You seem to have the most unfortunate workplace sometimes.
 
11:09 PM
Is this question okay?
 
@EBrown Let's just say there's a lot of technical debt
 
I am not getting a hair cut. My locks will intimidate the enemy
 
@SirPython Looks like it at first glance.
 
See my comment on it.
 
Ah, didn't read too far into it.
I would say it's very gray, in that case.
 
11:10 PM
TTFQW
3
 
@Phrancis I know what that F is.
 
Fart.
 
11:12 PM
@EBrown Dirtier, if I know Phrancis.
 
@Hosch250 I do know @Phrancis. :)
 
This chatroom is crowded! Only about 1/3 as many where I come from
 
Yeah, there's quite a few of us in here.
 
not crowded, just merry :-)
 
@EBrown What should I do about it?
 
11:13 PM
@Quill Well, it's that time of year . . .
 
@SirPython I'm not sure, I would probably VTC until the OP corrects those issues.
 
Zak
@Nį“į“ ÉŖį“„į“‡IÉ“DÉŖsÉ¢į“œÉŖsį“‡ This is only slightly above-average for the 2nd :)
 
@Nį“į“ ÉŖį“„į“‡IÉ“DÉŖsÉ¢į“œÉŖsį“‡ Yeah ;-) 10 days until winterbash!
 
Meh, nothing stoppin gyou from starting winterbash early.
 
actually... no hats.
just saying
 
11:16 PM
^that
 
  /\
_/  \_
@Vogel612 ^^ that good?
 
artiste
 
Anyone interested in watching a group of suicide artists? pinkbike.com/news/…
 
1
Q: Find and extract delimited packet in buffer

M.MI'm writing in VB.NET, using VS Community 2013. I don't know much about this language. I have managed to make my code work, but I suspect it is possible to improve the code a lot. I am using the asynchronous read functions of TcpClient, and whenever a newline character is received, the handle_...

0
Q: Path validation helper in a 'path input box'

BartoszI have a helper extension method that I use for path string validation. It looks as below. It's purpose is to work with network paths as well, so in case a network resource is not available, I do not want my applications to freeze, hence the specified timeout etc. public static bool IsExistingFi...

 
11:29 PM
@Hosch250 At least they are wearing helmets.
 
A helmet won't prevent a broken neck.
 
Zak
@EBrown I'm honored
 
No, but it looks cool ;)
 
@Quill Dang, 12 days till I'm out of school
 
@Caridorc Beating a dead corpseā€¦
0
A: Extract logic applied in a sequence of integers

200_successI'm not convinced that your special case getSequenceLogic [x] = printTuples [(1,0)] is justified. If [100, 103] is to be summarized as "1x3", then don't think that [100] should be "1x0". I would consider an empty string to be a reasonable summary of [100]. When possible, you want to avo...

 
11:32 PM
I'm going to miss two whole days of winterbash
 
Zak
huh, could've sworn I just got pinged
 
@Zak I saw it too. Someone was pimping one of your answers.
 
@syb0rg ha! I finished two weeks ago :P
 
@Quill Very jealous rn
 
@syb0rg 14-16 days here.
 
Zak
11:37 PM
@Hosch250 This was after that
 
@Hosch250 he replied to that one
 
As I sit here doing my Thermodynamics homework
@Hosch250 Hey, samish boat!
 
Oh, I didn't see it when I looked for it.
 
0
Q: Advent of Code - Day One

Ben JohansenI tried to write a foolproof code for the first part of the first problem on adventofcode, and I was hoping for some feedback. function findEndFloor(floors, upFloorSymbol, downFloorSymbol) { if (typeof floors !== 'string') throw 'parameter 1 is expected to be a string'; if (typeof upF...

 
@syb0rg to make it worse, I'm also working
 
11:37 PM
@syb0rg Samish boat?
 
Zak
I've lost all connection to school holiday timetables. I only know when they are because suddenly all the rush-hour traffic disappears.
 
@Quill Ew
@Hosch250 Same-ish -> samish
It totally works
Ask the robot part of me, it can parse it
I concur
 
in CR Secret Santa 2015, 21 mins ago, by rolfl
My secret receipient will be getting "Java Performance Tuning", and a lump of coal.
 
We have a secret santa thing goin on?
 
Yep.
I won't be doing it for a couple years, but maybe once I get a job...
 
11:40 PM
14
Q: Code Review's Secret Santa 2015

TopinFrassiTo celebrate our first graduated Christmas (and because we feel like it), some regulars in The 2nd Monitor thought it would be a good idea to make a Secret Santa between members of Code Review! The rules are quite simple : You will send an email to secret-santa@lambdaexpression.io to register...

 
possible answer invalidation by EBrown on question by Bartosz: codereview.stackexchange.com/posts/112677/revisions
 
Have fun, all of you who are doing it.
 
@Duga It's fine.
 
@EBrown Double checks.
 
@Hosch250 Feel free. I was the one to answer it.
 
11:41 PM
@Hosch250 I'm already doing the reddit gift exchange... and I'm somewhat behind on that
This sounds more fun actually, since I feel like I know you people better
 
Zak
@syb0rg How big is it these days, hundreds of thousands of people?
 
@Zak Something like that, yeah
 
I did that last year, it was pretty cool
 
Zak
hundreds of thousands, and the occasional billionaire :)
 
Well, wrote one answer today. I suppose that's enough.
 
11:44 PM
Reminds me of that girl who said she wanted an iPad and she ended up getting Bill Gates
 
@EBrown More than me lol
 
Zak
@Quill The one that stuck with me was the Loki helmet, that thing is awesome
 
> MACINTOSH: Most Applications Crash; If Not, The Operating System Hangs
> Windows 95 is a 32 bit extension for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor by a 2 bit company that can't stand 1 bit of competition.
7
 
@Hosch250 lol
 
On marriage: Isn't this like merging two entirely different code bases? I mean it basically takes 20ish years automatically working out the merge conflicts.
@Quill Where was that?
 

« first day (942 days earlier)      last day (3074 days later) »