« first day (839 days earlier)      last day (3180 days later) » 

7:00 PM
It was on her request.
 
Current girlfriend started CC recently. I helped her with some MATHLAB when she took her first coding class, though she hated it.
 
Lol, for some reason I'm imagining a hilarious reaction.
 
Weren't you the one who tried to teach his wife/girlfriend about HTML and Javascript?
 
@Mast Think he means you, btw.
 
7:01 PM
I'd never dare teach someone the horrors of JS.
 
Oh, right
You hate Javascript
But come on!
 
JS and Python are legit starting languages though.
 
Easiest way to get a divorce I think...
 
You can run PHP on it!
 
lmao
 
7:02 PM
@Legato Python definitely.
But JS... It's considered as such, but I don't agree.
 
I saw somewhere that W3C is writting the specification for WebAssembly
 
I think both are good. But I'm biased since I started on JS. I really do think it's super simple though, I think once you get into the libraries and frameworks it can get messy, but I don't think I've ever gone deep enough to know the horrors which make you cringe.
 
I think starting on a strictly typed language would be beneficial. Just my $.02.
 
Javascript is a self-descructive language: it kills itself if you f*ck up
 
@IntensifierDescriptorMan Indeed.
 
7:04 PM
Start with Pascal
Honestly
 
I started with BASIC, later C. But C made more sense when learning than BASIC.
Pascal is quite nice as well.
 
I started with C++. So my bias opinion is to start with that. You can use just really simple stuff, or go more advanced. And unlike Java, you don't have to start out with classes.
 
But Java works on everything. :D
lol holy wars.
 
I personally hate Java, but I really have no reason. IDE I think accounts for most of it TBH.
 
Really? I don't use an IDE.
Though I'm told that's really bad and I should.
Not enough space on computer. heh
 
7:08 PM
OMG, I know. Visual studio takes up so much space.
100% worth it.
 
@Mast Pascal is easy because you almost speak it. You can read Pascal quite easily to plain English.
And you should thank God that Javascript is the web de facto language
 
@IsmaelMiguel Yea, it's meant to be readable by design.
 
@IsmaelMiguel with good abstraction levels, any OOP language should read like plain English
 
Imagine if it was Portugol
 
0
Q: Gives a live view to a changing file on server

preezzzyI have a file on my server which contains a running output of a script. This file is constantly changing and fluctuates in size between 0 - 1Mb. Now I want to take this file and make it viewable from the web. Currently I am using jQuery to get the file then I set a textarea's value to be the file...

0
Q: Calling table objects in db many-to-many relationship

amarieAIM: Best practices and design pattern usage / Correctness in unanticipated cases Hi all, I have been busy building my first database using SQLAlchmey. I am concerned the design of my custom API query can become a cause for error. The tables are declarative, some have relationships, and it is my...

-1
Q: To remove vowels in a string

DCoder To remove vowels from a string I have implemented the following code in c++ for the same: #include<bits/stdc++.h> using namespace std; int main() { string s; string l=""; cin>>s; for(int i=0;i<s.size();i++){ switch(s[i]) { case 'a': case 'e': case 'i': c...

 
7:10 PM
@Mast Which is a nice thing
@Mat'sMug I disagree :/
 
@CaptainObvious Burn.
 
@CaptainObvious literally: plz halp!
 
@Mat'sMug It's literally Help plz. but close enough.
 
@Mat'sMug Jamal took it
 
I've so many languages on my to learn list. One reason I like this place is sometimes it provides the semblance of direction I often lack being largely self taught. Education paradox super frustrating.
 
7:12 PM
Well
 
I recently started learning functional stuff (F# specifically). Never imagined how different it would be.
 
Sometimes the knowledge simply highly lacks important parts
I had c# classes for 3 months
And Mat'sMug's answer has some things I've never heard of
 
Well, those classes probably helped you at least know where to go/what to do to understand the things.
 
Sadly, I still don't get it
Why?
Because I lack the knowledge
 
Some stuff takes a while. A lot of the answers on here require a fully study, and going back over it time and time again, I favorite them in that case.
Like, your Regex answer.
 
7:17 PM
Mine?
Where? When?
 
@IsmaelMiguel there's a difference between knowing a language and knowing how to code - a C# class will teach you the language, not programming.
 
I'd see that, and wouldn't even try to understand it.
The one you have on SO.
 
The phone validation?
 
Yup.
 
@Mat'sMug But, there can be good programming knowledge too - if you are able to see it.
 
7:18 PM
@Mat'sMug When I had classes to learn C#, I already knew how to program. But my knowledge of C# is limited and was stopped.
 
I'm sure a C# class should teach plenty of ubiquitous programming concepts.
 
IDK, I never had a C# class. my last programming class was VB6.. or C++, some 10-12 years ago
 
@Legato Probably a lot of nefarious programming concepts, too.
 
Of course heavily depends on how engaged you were/how your teacher was.
 
shit, 15 years ago
 
7:19 PM
@Legato Almost none
 
@Mat'sMug Any language class uses programming concepts.
 
poorly
they didn't teach us design patterns
 
Usually, yes. Not always, I'm sure.
 
IDK about now
 
My teacher was more worried about the color of a label than to teach what is an interface
2
 
7:20 PM
That's why I told all my campers about CR.
 
@Mat'sMug My class was pretty bad.
 
How bad?
 
I'm going to have to see if there's a class on design patterns at uni, probably not.
 
Highly doubt it
 
I don't know how bad, because I actually worked on the material hard.
I did the book like I was doing it myself, and just turned in the material required (which was posted after I had already work through the book chapter).
 
7:22 PM
Well
We didn't had books
 
Oh, and your polyglot too.
 
We had a teacher
 
But, we didn't even get the JAVA classes. And we were pretty much supposed to comment every line.
 
@Hosch250 JAVA?
 
Didn't even know about those before I read that the first time.
 
7:22 PM
What language is that?
 
@IsmaelMiguel We did too. And yes, JAVA.
 
I learned everything in books. and on Stack Exchange.
2
 
Where's the meme?
 
Books and stack exchange.
2
 
@Legato You mean, the ?
 
7:23 PM
@Mat'sMug @Legato That's the way to do it. That's where I've learned everything useful too.
 
Yeah, 90% of everything I know comes from there. Again only frustrating part is lacking direction sometimes/paradox of choice, etc.

But it's very effective when I have projects in mind. Projects are just generally awesome ways to learn.
@IsmaelMiguel I don't understand your question.
 
Poor polyglot. It feels lonely.
 
@Mat'sMug Back in my day, I used F1 in Delphi to learn.
2
 
@Legato You said: "Oh, and your polyglot too." and I meant if you were asking about my polyglot questions (by the means of a tag)
 
Specifically, why you made it a tag, is there a reason, and does the imply that there's more than one? I remember seeing it a while ago, probably when we first encountered.
 
7:26 PM
@SimonAndréForsberg oh wow... yeah, F1 in VB4 through VB6 - heck, MSDN came on CD's in that ..age.
 
60
A: Write program in your favorite language in another language

Ismael MiguelPHP and Javascript This is a polyglot: You can run this code in both languages: if("\0"=='\0') { function printf(){ $b=Array(); $a=$b['slice']['call'](arguments); $a=$a['join'](''); console.log($a); return $a.length; }; function strtoupper($...

Incidentally, I thought I upvoted it before, but there you go, hehe.
 
@Legato That's on another site. It's runnable on JS and PHP
 
I think cross language stuff is neat.
Yeah, I know, by definition.
 
Check then
 
But I didn't even know that was a thing, until I encountered your post.
That's neat.
 
7:27 PM
I like it as well
And if you hide a whitespace program in between, it's even better
 
Hm.
 
whitespace is the "B-Side" of programming languages. it's like "what happens if I play that record in reverse"
 
i like polyglot stuff
@Mat'sMug There's a language that's only comments
 
and I thought LOLCODE was esoteric
 
@Mat'sMug and Brainfuck is...?
 
7:30 PM
Not sure how or why you guys are making these jumps.
 
@SimonAndréForsberg Is the tape data
@Legato What jumps?
 
@SimonAndréForsberg somebody pin that! Good grief I've spent more time trying to get people to press that button than actually coding in the last 5 years.
 
hey @RubberDuck
 
Anyway, Time To Go Home!
 
Quack!
 
0
Q: Resultset to ArrayList getting override

SujataI am trying to add the values of result set to a list. But all the values in my list are getting overridden by the most recent one. So at the end of the loop when I am returning the list it has all duplicate items. how to correct it. public List getTransactions(){ try (Connection connection = t...

 
@CaptainObvious OT.
 
I never get anything done at work on Fridays...
@SimonAndréForsberg The QuickBASIC F1 was the best, IIRC.
@Mat'sMug "B-Side" of a record != playing in reverse.
 
7:51 PM
@EBrown shhh
;-)
 
@EBrown you shouldn't say stuff like that out loud
 
@Malachi Wasn't out loud, though my boss did just leave my office when I said it.
Only really applicable today because all of us in IT took a 2 hour lunch for my birthday.
 
lol
 
47
Q: 10 Million Questions - Let's Share Some Stories That the Number Doesn't Convey

Tim PostIt's easy to look at numbers; numbers tell us that billions of developers have been helped by what we built. That alone is very warming and makes us feel exceptionally great about what we're doing, wouldn't it be nice to take a little time on a Friday to share some stories that the numbers can't ...

free goodies people
I want a SO mug
 
Improving working code is a better fit for Code Review, I would recommend you to move the question there, — Keppil 43 secs ago
If you have working code, the Code Review stack exchange is a better place for your question. However, before posting there, I suggest you improve your title (maybe, "Palin Pairs program improvement"?) and remove the unnecessary bolding. The more effort you put into your post, the more likely it is that you'll be helped. — Trobbins 56 secs ago
 
8:02 PM
looks like SO has an overstock of SO mugs lately
 
@Mat'sMug I have an SO mug. :)
 
I could use a second SO tshirt
In case I grow fat
 
I don't
 
> The good news is, this isn't a contest, everyone that shares something here will receive:
why do I have a feeling they're gonna regret that? ^^
 
I've already qualified myself for all the goodies that come with sharing a story
now I have to keep an eye out in case someone talks about my answers
which could totally happen
I believe in it.
 
8:16 PM
I'm really scared to extract an interface from this class...
 
0
Q: Handle data received by ajax request and update database (prepared stmt)

EkinI have an ajax request from a page where the user is being asked to enter their date of birth. The request url file has the code below and works all good. However, I'll be rewriting all mysql/mysqli functions used on the same website and this is generally how I use prepared statements. Should I a...

0
Q: Palin Pairs Code

RaviIn an array of strings 'a' having 'n' strings i have to select the Palin Pairs from the given strings .for ex for input 3 bba abb abb Output=2 I am getting correct output but want to reduce time complexity....what other logic or enhancement I can use to optimize the code import java.io.Buffered...

 
@Malachi I'm back!
 
@JeroenVannevel You have any suggestions on this question?
 
@IsmaelMiguel welcome back. I am about to go into a meeting here shortly
 
Alright
 
8:20 PM
BTW.Normal everyone, sale pending on my house
 
I'm at home and neck-deep in shit work
 
I may be in Tennessee before October! I just need a job down there now....
@IsmaelMiguel what do you mean? didn't you just leave work?
 
@Malachi Yes, and my boss stuffed me with shit to do at home and tomorrow
 
@Malachi Housework is the hardest...
Oh, ouch.
 
@IsmaelMiguel sucky
 
8:22 PM
A lot
Probably I won't even wake up
I'm tired as hell
 
@SimonAndréForsberg heck I can use another mug :)
 
@EBrown lots of specialized code that I'm not familiar with (XNA). All I could do is throw stones at you for omitting braces and not using var, but I won't
 
@JeroenVannevel You don't have any suggestions for my encapsulation process?
 
@JeroenVannevel +1 :)
 
8:24 PM
@Mat'sMug fistbump +1 back
@EBrown let me take another look
What encapsulation are you referring to precisely?
 
Well, take a note at my points at the bottom of the question.
Those are my largest concerns.
I'm mostly worried about the appropriateness.
I have to share some of the code between client/server.
But the drawing code obviously cannot be shared between them.
 
I tried sharing models once between UI and backend (Web Api & WP app)
never again
It's such a mess, it wasn't even funny
2
 
This is starting to look that way.
 
1
Q: Skinny model, fat controller in Rails managing user IP addresses

Alan KisAs part of learning Rails framework, I have small app in progress. Basically idea is, user can create IP address, define is it in use, to which server is assigned, which user is it using and role of IP address in web hosting environment. I have 3 models, IpAddress, IpAddressRole and IpAddressUser...

 
Properties need UI annotations, validation annotations and DB annotations and you just know there is bound to be a circular dependency at some point between your projects
so much for separating them
anyway
 
8:28 PM
Well, I've found the best dinner ever!
1L of ice-cream and pringles
 
I can't think of a good solution for your two-parent problem
 
@JeroenVannevel :( Well I appreciate you looking.
 
I guess interfaces will be your way to go, if possible
I don't know how much is baked in XNA
 
@JeroenVannevel Well interfaces are always possible. :)
 
9:00 PM
0
A: Review of document registrar

sol4meFew points: Try to avoid long or nested if/else Sub-divide tasks in smaller functions(clean and more readable code + easier unit testing) Minimize variable scope(try to declare variables in the scope where you really need them) Think about Exception in context of your business domain, may be u...

 
Pimping SO.Meta for our own @nhgrif: meta.stackoverflow.com/a/303095/4564272
 
I should write an answer calling out the people in the WPF chatroom.
Actually, though, I've learned the most here, from @Mat'sMug, @Heslacher, and @JeroenVannevel (and the rest of you guys who have posted answers).
We just need to make our zombie count skyrocket and get to 10k questions ;)
 
uh, no ;-)
 
I actually think that answer by nhgrif is really handy, even for a non-Swift guy. :)
Though my write-up of it may be less-than-idea.
 
What does the bossman say when you quit because you are the smartest person in the room?
 
9:10 PM
???
 
There is a saying that you should always try to have someone smarter in the room so you can learn something.
 
!!!
 
So, when you get to be the smartest person in the room, you need to find a different room.
 
Makes sense.
 
So, what does the bossman say about that?
 
9:11 PM
No idea.
 
And what does the interviewer say?
2
Or maybe saying it right out makes you not so smart...
 
It is TTGH.
 
See you.
 
'night! later!
 
9:13 PM
Everybody have fun tonight! :)
 
@Mat'sMug Sounds like a tornado siren.
 
(Wang Chung.)
 
@Hosch250 I only posted it because I know you don't click these links. that song is horrible.
 
I almost clicked that one. Good thing I didn't.
 
lol
 
9:15 PM
I'm stepping out now, see you later.
 
@Mat'sMug I did click it.
 
@EBrown I'm sorry :/
 
@Mat'sMug Hadn't really heard that song before.
Just got an email from a recruiter, about an interesting job.
Anyway, actually TTGH now.
See you all later. :)
 
9:31 PM
Before you clarify what "better" means for you this question is likely "opinion based"... Please consider clarifying what kind of improvement to algorithm you hope to find OR possibly move question to codereview site. — Alexei Levenkov 53 secs ago
 
@Duga Meh, a bit examplish.
 
0
Q: "Rails Way" to Sum the Size/Count of Associations for Multiple Records

LaurenI'm working on a plain Ruby class within a Rails application. For the total_leg_count method---is that the best way to go about achieving what I want? I feel like there's potentially a better way. class AircraftTimeReport ... def total_leg_count count = 0 active_flights_within_tim...

 
9:50 PM
@JeroenVannevel what problem? I like XNA
 
his question
on CR
He has 2 Player classes, one by the framework and one self defined
 
10:07 PM
0
Q: Javascript prototype - Multiple inheritance pattern

DataI wanted an easy way to augment objects, by adding functionality from any other object(s). More importantly, I needed a way to augment the object from multiple sources in a clean one-line solution. The inheritance is done with this: function extend(proto, args){ this[proto.id] = Object.cre...

 
10:27 PM
So... I should be getting a shirt. ;) thanks @EBrown
 
This is one of the best examples of codeless answers I've seen in a long while. ++ for beating me to the interface:class ratio in regards to the IoC container. — RubberDuck 20 secs ago
Ugh... @Mat'sMug why? Nobody cares what the fox says. Honest. =;)-
 
Pimping an awesome answer by a pretty new reviewer!
2
 
3
A: 10 Million Questions - Let's Share Some Stories That the Number Doesn't Convey

EBrown Swift: Class does not implement its superclass's required members Hanging out in The 2nd Monitor on the Code Review chat has it's benefits, one of them was the discovery of this gem by nhgrif. If you read through the question, and all the comments, it tells it's own story: The OP had writte...

 
@Hosch250 I really thought I wasn't going to be the smartest guy in the room when I took this new job. So far, I think I was wrong, but at least I'm learning new things.
 
@RubberDuck Thanks. Now I'll have that song stuck in my head ;D
 
10:38 PM
I posted this, which may interest you: codereview.stackexchange.com/q/101612/81741Data 23 secs ago
 
Don't blame me @Phrancis. It's all the Mug's fault.
 
I found out something cool you can do yesterday, did you know you could use execute like this?
if object_id('tempdb..#test') is not null drop table #test

begin transaction

create table #test ( foo varchar(max) )

insert into #test values ('hello'), ('world')

declare @query varchar(max) = 'select * from #test'

declare @table table ( bar varchar(max) )
insert into @table (bar)
    execute (@query)

select * from @table
rollback transaction
I'm guessing you could also do that with sprocs if they return tabular data
TTGH - WEEKEND!
 
Hmm? So what exactly?
 
Yes, you can execute SP into an insert.
 
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — Kyll 45 secs ago
 
10:46 PM
One of my checkins broke a build... Because we have to check everything into two branches so it's confusing madness.
If I keep doing this, I wonder whether the result will be doing hit the right way or just moving me to another project?
 
This is awesome.
10
A: 10 Million Questions - Let's Share Some Stories That the Number Doesn't Convey

MureinikThe day StackOverflow made me understand open source The Details The Question: How to close PST file in Java? My Answer: http://stackoverflow.com/a/27164871/2422776 The Story behind them This isn't an especially highly voted, or even a very popular question, nor is my answer, but it's a great e...

 
@RubberDuck lol
 
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — Kyll 54 secs ago
 
@RubberDuck I promised not to participate on StackOverflow's meta, but that is upvote-worthy
 
11:03 PM
I don't even understand what they are doing with their git... It's so stupid.
 
@nhgrif Yeah, that's the hope. :) That Swift answer was really good man.
Totally worth a shirt in my opinion. :)
What's funny is I already have all that swag except the pen.
Really want that pen, damnit. >.>
 
I have no swag.
 
Borderline hypothetical. Opinions?
2
Q: Javascript prototype - Multiple inheritance pattern

DataI wanted an easy way to augment objects, by adding functionality from any other object(s). More importantly, I needed a way to augment the object from multiple sources in a clean one-line solution. The inheritance is done with this: function extend(proto, args){ this[proto.id] = Object.cre...

 
@nhgrif We are the swagless
 
@Phrancis Summary: write Groovy like you would write Ruby.
 
11:16 PM
0
Q: Switching a class between elements

jackdhI have a large table of text items. When I click on a class I would like to add a certain class to it, but also remove that class from previously clicked items. I don't want to have to scan through each item to check if it is there and remove it so I came up with this although I feel it may be ...

0
Q: A simple backup script in python

magu_Since rsync lacks compression and I'm not a big fan of rdiff I thought I try my own little backup script. Since I'm very inexperienced with file management in python I'm sure there is lot of room for improvement... The script creates the entire folder structure within the backup folder and then ...

 
@nhgrif Well now you'll have some. :) You should write a story about something as well, get more stuff.
If you get the same type of shirt I did, they are really comfortable.
 
@200_success Doesn't look problematic to me, but I can understand why it would look borderline.
 
Every time I run across a C# class with a GetEnumerator function that does not implement IEnumerable (or better, IEnumerable<T>), I die a little inside :|
 
@DanLyons You shouldn't. It's the writer who should be dying a little every time he dares such a thing.
 
he's not here right now, so that can't happen... yet
 
11:24 PM
Those who can, do.
Those who can’t, teach.
Those who can’t teach, teach PhyEd.
Those who can’t teach PhysEd, work in IT for the government.
First rule of optimization: it doesn't need to be correct as long as it's fast.
That's why I always sprinkle sleep() calls all around my version 1.0. Makes easy to make speed improvements in later versions.
5
 
@Hosch250 I'm keeping that in mind for work. :)
 
@Hosch250 It won't surprise me if that is actually done...
 
Some stuff on Twitter is great, the rest is trash.
 
Just like the rest of the internet.
 
We need to seine the great stuff out and remove the trash.
Then start Greaternet 1.0
 
11:28 PM
0
A: 10 Million Questions - Let's Share Some Stories That the Number Doesn't Convey

QuillAn answer I think deserves recognition is this: Is VBA an OOP language, and does it support polymorphism? As a kid, I'd written many VBA scripts for little things like changing settings files out, and from I what had seen, I thought VBA was OOP, and despite that the answer wasn't to a question ...

 
This might be better suited for codereview? codereview.stackexchange.comJan 44 secs ago
No problem mate, I'm not saying it definitely doesn't belong here, it just sounds more like a code review request to me... — Jan 1 min ago
 
@Quill Already upvoted. :)
 
I think we need to post an answer for Jon Skeet and Eric Lippert.
 
@Quill woah, I'm honored!
2
 
Can we pimp this answer a bit?
 
11:38 PM
@200_success I'm guessing you mean that as a good thing, right? I don't know a thing about Ruby but if it's anything like Groovy, must not be bad at all
 
That guy definitely put in a lot of thought to writing that answer.
 
0
Q: Passing data from a parent object to one of it's nested child objects when using a compose function

Spencer CarnageI've been applying functional programming to my JS code with a heavy emphasis on using underscore's compose along with a simple map function which looks like this: // map allows me to compose better than _.map which takes the arr // arg first instead of last let map = (f) => (xs) => xs.map(f); ...

 
And it's answers like that which indicate exactly why I enjoy the Code Review community.
@Hosch250 Nah, someone will do that at some point.
Just like someone will post one for Aaron Bertrand and Marc Gravell as well.
Does anyone else make sure to accept answers on all their questions, provided there is an acceptable, helpful answer?
 
I think @Phrancis said something like that once
 
@Quill huh?
 
11:49 PM
SO is generally meant for problems or errors with code, I think its a better fit to ask your question at Code Review which is the SE place for reviewing code and giving improvement tips :) — DragonSamu 45 secs ago
 
in The Bridge, 7 mins ago, by GodEmperorDune
> Internet companies across China are embracing programming cheerleaders, pretty, talented girls that help create a fun work environment. Their job includes buying programmers breakfast, chitchatting and playing ping-pong with them.
@Phrancis About making sure you tick answers that help people out
It had >6 stars or something
 
Anyway, later @all. We'll see you lads and lasses another day, I've got an ECS to develop. :)
 
It'd be a shame that someone goes unrewarded for the selfless act of helping you make your code better! #PayItForward
 
@EBrown Me.
 

« first day (839 days earlier)      last day (3180 days later) »