« first day (475 days earlier)      last day (3544 days later) » 

4:03 PM
Not another ?
@Bhathiya ^^
 
@DanPantry If someone is mentioning Scala, it's either me, or someone talking about me. :-)
 
But when choosing a language, advantages and disadvantages are entirely context dependent. The biggest advantage of Scala for me is that I can think and work in it better than I can any other language I've ever been exposed to.
Though sometimes I miss the old days when Pascal was all I knew and the language API was so limited that you pretty much had to roll everything yourself.
 
@DanPantry welcome back
 
4:17 PM
thank ye kindly
 
Remember this @Malachi?
Jan 10 at 18:20, by Malachi
Pauses Dubstep
2
 
@Phrancis yes I do.....
listening to christian rap right now though....lol
Jan 10 at 18:22, by Jamal
Programming programming YEAH. Programming programming YEAH.
 
Monking
 
Monking @skiwi - Just in time for... this:
0
A: What's a Zombie? And what are the many other memes of Code Review?

PhrancisMeme: (also knows as "Guess what day it is?") Originator: SimonAndréForsberg & Jamal Cultural Heigh: The 2nd Monitor Background: On Jan 10 2014, the following remark was made in the chat room: Simon André Forsberg: It's Friday, Friday. Gotta write code on Friday. singing And then this...

 
@Phrancis lol
4
 
4:28 PM
user image
5
I want ^
 
Click it! It's safe for work.
 
> The Web site you are trying to access has been blocked by the Web Filter because it is in the Visual Search category, access to which has been blocked by the infrastructure team.
Just tell me what to Google lol.
 
No worries I'll check it out tonight
 
4:32 PM
revolutionary
(can you see that?)
 
Oh, that's awesome!
 
@Phrancis ... you're blocked from imgur? you poor thing.
 
I would actually like to have a "Does this code make my ass look fat?" shirt.
2
 
@Schism if you only knew all the sh** I'm blocked from here
 
Xkcd is on a roll this week.
Loop
 
4:38 PM
@RubberDuck it's hard to get bored looking at these sorts of images though
 
Also blocked from Xkcd :(
 
It must be Friday or something.
3
 
Got that damn song in my head now :-|
 
someone tell me that this answer is easy to follow, and makes sense, I have been working on it for a while now....
0
A: Generic ASP.NET MVC controller that generates many pages

MalachiThis switch should be an if statement instead. if (input == null) // we didn't get an input from GetCustomEditorInput { switch (property.PropertyType.Name) { case "Boolean": input = new ExpressFormsCheckBox() ...

OKAY I WILL LISTEN TO IT!!!!!!
5
 
4:51 PM
@DanPantry do you indent two spaces or four when you are writing Lua?
 
@bazola the answer is always tabs. let the reader choose their tab size. :P
 
@Mat'sMug Not sure what I'm writing (still need some refactoring), probably some monstrosity.
 
@Konijn beat me to this one -> codereview.stackexchange.com/a/60808/18427
 
Uh oh. Tabs vs. Spaces
 
@Phrancis what?
 
1
Q: Implementation of a AVL Tree

Calv1nI attempted to write a AVL Tree in a functional style and I was hoping to get it reviewed. This is my first review, so please forgive me if this is too general of a request. I was looking for the code to be clear and concise, any opportunity for improvement would be greatly appreciated! Thank you...

 
good song.
@Phrancis will read later
 
@bazola 2 spaces these days for anything that isn't C#. in the old days i used to use tabs then realized how awful they were
 
@DanPantry I'm the opposite; I used to always use spaces, until I had to work with coworkers with vastly differing indentation preferences
 
@Schism i'm not a very accommodating person you see :p
 
4:59 PM
Would there be people who prefer indentation of 16 tabs?
 
TFL
 
well thanks for the advice from both of you
the IDE i am using was just tabbing to 2 spaces, i thought it was doing 2 spaces manually :)
 
@bazola it really is down to personal preference just pick what is readable for you
 
i just didn't know if there was some language convention for Lua because a lot of the code I see is 2 spaces. Objective-C with Xcode is always 4
 
@bazola python is 4 spaces
 
5:01 PM
@bazola majority I see is two spaces as well, but I think that's because 4 spaces is pretty excessive. I think people only use 4 spaces because that's how many spaces make up a tab
 
@Bhathiya-JaDogg-Perera great! can't wait to review it!
 
i hope I have not opened up pandoras box :)
3
 
class HelloWorldApp {
                public static void main(String[] args) {
                                System.out.println("Hello World!"); // Display the string.
                }
}
@skiwi ^^
 
16 space indentation
pretty sure after 3 indents you'd reach the vertical rule
w code of course
 
Unicorn down
TFL
:)
 
5:07 PM
wow, thanks @Santa!
 
Is @Schism in here? I'd like to thank him for bumping that VB.Net question.
 
^^ done ;)
 
@RubberDuck ♥
6
 
So, I'm just gonna vent this. Programmers should not have to write a business case to get Git installed.
7
 
@DanPantry pretty easy to make a GUI using Lua? I'm eventually going to need to make one for a business app to interact with my PL/pgSQL DB and I need it to work on OSX and Windows machine both
(but no other device)
I was going to learn Java but seems a bit overkill to make a simple GUI
 
5:15 PM
@Phrancis No clue, I only used lua for WoW-related cases.
Lua is not a stand-alone language though and needs to be embedded within SOMETHING
 
Ah. Maybe I should just stick to Java
 
you could check out Love2d
and I'm pretty sure there are going to be some kind of gui libaries ported to lua (read: Qt)
fk sake
my USB harddrive is mapping to G: instead of E:
so all of my references are broken
what do?
nvm fixed
got eclipse back, yeaaaa
AHA!
finally a package manager that doesn't suck :-)
 
5:38 PM
0
Q: Refactoring huge if..elif in __init__ how?

WalkmanI have this huge __init__ method, which is readable I think, but still doesn't feel right after watching Clean Coders videos (content of Clean Code book by Robert Cecil Martin). How could I get rid of (refactor) the gigantic if..elif block in a nice, readable way? Or should I leave it as it is? D...

0
Q: Finding K-th to last element of a singly linked list

Pervy SageI am currently reading the book "Crack the Coding Interview" (5th edition). There is a particular problem in it saying Implement an algorithm to find kth to last element of a singly linked list. There are various approaches discussed to the problem. I am particularly confused by the recursive sol...

 
5:50 PM
0
Q: Perl add a member or call a function?

MarkI am working in perl. My main module has many attributes in it (about 30). I need to call a function that is O(n) where n is currently 9 and I don't see it getting bigger than 20 in the next 5 years. My question is this: I will need to call this function (determine_values) either 3 times, or ...

 
no more stars.... :(
2
 
@Phrancis ouch
 
@RubberDuck I ended up replacing IRepository for IUnitOfWork on all IPresenter implementations. I'd put up the UoW for review, but transactions don't seem to work (I don't commit anything and it gets to db, and rollback doesn't do anything) so I might end up on SO first...
 
@Mat'sMug lame.
Wait. You're doing transactions?
 
6:01 PM
damn right
 
Nice.
 
Transactions easy to do in WtfSQL MySQL @Mat'sMug?
 
well the only problem is I don't know why MySQL actually performs an update without committing the UoW
@Phrancis thought so..
connecting through ADODB with a MySQL provider
 
I used to use a libary called SharpRepository that would always save to the underlying DB layer without using commit
it was infuriating
 
Private Sub Class_Initialize()
    adoConnection.ConnectionString = CONNECTION_STRING
    adoConnection.Open
    adoConnection.BeginTrans
End Sub
 
6:03 PM
close this.
This question appears to be off-topic because it is about 3 different programs, each program should have it's own question. — Malachi 14 secs ago
 
that doen'st make it off-topic, does it?
@DanPantry well I know ADODB transactions work perfectly fine with a SQL Server provider
 
I think it just makes it a bad question
 
downvote, perhaps? closing seems a bit extreme
 
@Mat'sMug I was just thinking of editing out the code that doesn't match the Title.... thoughts?
 
I DV
 
6:06 PM
oh damn. "DRIVER={MySQL ODBC 5.1 Driver}"..
0
A: php adodb StartTrans() is not working?

hayanderThere are two different drivers for MySQL in ADOdb: mysql mysqlt The first one (What you probably used) has no transaction support while the second one does. Try using the mysqlt driver: $conn = ADONewConnection("mysqlt");

 
@Phrancis I downvoted as well
 
That's a thought, @Malachi.
 
I am going to write a meta question about that
 
@Malachi The close reason you are looking for is probably "Too broad"
 
0
Q: 3 programs, one post, can I delete the ones that don't match the title?

Malachiin this question Creating a vector of 10 positions and printing only prime numbers the OP has posted 3 programs and has been told to post separate questions, would it be acceptable for me to edit the question to the code that does what the title says (and the tags)?

@SimonAndréForsberg TSG
 
6:09 PM
G?
 
Theoretical StarGree
5
A: What's a Zombie? And what are the many other memes of Code Review?

MalachiMeme: Stargree, Stargreed Originator: Skiwi Cultural Height: A conversation about a duck Background: Stars shine in CR chat quite fluently, and it sort of means that we either find it funny or that we agree, if this were Facebook they would be Likes

 
LOL
NotePad++ is an IDE
 
> An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger
 
@DanPantry I've done "real men" programming, and just for the record, that's the stupidest meme in the universe.
 
6:13 PM
Notepad++ is a text editor that may or may not have syntax highlighting :(
at least, that's all I use it for
@Donald.McLean it was a joke :P I wasn't actually being seirous
serious *
 
@DanPantry if you press the up key on your keyboard you can edit your chat posts for a limited time
 
@DanPantry You can never tell. Some people actually believe that.
 
@Malachi I know, I'm just too used to NOT being able to do that, that it becomes force of habit :(
 
@DanPantry I hate not being able to do that on my browser games and stuff now...
 
@Donald.McLean I was starred earlier as saying - sarcastically - "in my day we didn't have your fancy shmancy coffeescript, we wrote REAL codes in javascript" or something to that effect
I don't have a view of "real programmers", if you program that's good enough for me :p
 
6:16 PM
@DanPantry LOL. The first programming I ever did was Fortran 4 on punch cards. They ran student programs on Wednesday and Saturday.
 
0
Q: 3 programs, one post, can I delete the ones that don't match the title?

Malachiin this question Creating a vector of 10 positions and printing only prime numbers the OP has posted 3 programs and has been told to post separate questions, would it be acceptable for me to edit the question to the code that does what the title says (and the tags)?

 
@DanPantry the fact that you have two Skype icons on your taskbar is bugging me
 
goddammit what's the naming convention for java files again
@Schism: I have two skype accounts
ClassName.java right?
or TypeName I should say
 
@DanPantry Yes.
 
Don't worry, your question is fine. Jamal likes to edit everyone's questions. — 200_success ♦ Jul 18 at 5:52
LOL
 
6:19 PM
what, why
does notepad++
not have groovy highlighting
 
> You have fully used your vote allowance for today
 
@DanPantry Oh man. I recently updated my N++ to find that for some reason, global styles now apply to the Project and Function List panes... so now there are ugly white boxes around all the icons :(
 
6:39 PM
@RubberDuck UnitOfWork is up for review :)
 
@Mat'sMug Nice.
I'll try to check it out.
I'm still writing up that business case.
Which reminds me.....
> ugh....... I'm a programmer, not a businessman Jim.
 
@anyone Would this be a good place to start if I wanted to build a simple GUI to pass user input values to SQL using Java?
 
0
Q: A rather creative UnitOfWork

Mat's MugI needed a way of attaching multiple repositories to a presenter. Given I already had an IRepository abstraction, coming up with an IUnitOfWork seemed the next logical step. The code works, but I'm having issues with transactions because of MySQL (not sure if it's the driver or the underlying db...

 
Who recommended Gradle to me?
 
@DanPantry Depends: Did you like it?
 
6:45 PM
Lol. Can you explain why Gradle is trying to use a git url that I haven't actually typed in? prntscr.com/4fejxl
 
@Phrancis Even though that uses Swing, which is a bit old by now as JavaFX has entered the scene, I think that should work for you, yes.
 
I'm open to suggestions, but I'm going for functional over pretty, this will only be used by me & my graphic design partner to manage customers and projects
 
@DanPantry No, I can't explain that
 
obligatory
 
@Phrancis Swing should definitely be enough for you then, yes.
 
6:46 PM
 
OK thanks @Simon
 
@DanPantry I haven't used Gradle much myself, I have a hard time understanding some things about it.
 
i'll just go back to maven for now, -sigh-
I really hate xml
oh bugger me
the plugin created a folder in my project root that had a git repo that pointed to the wrong one
 
@RubberDuck hint: there's something fishy about cleanup
 
@Mat'sMug Looking for @ckuhn203? Try @RubberDuck
 
6:48 PM
yeah
 
lol
 
Class_Terminate won't get called unless all references are cleared.
 
Hey @Mat'sMug... I hate to say this, but you might want to rethink mentioning this.
> The code works, but I'm having issues with transactions because of MySQL (not sure if it's the driver or the underlying db engine, but everything just goes through as if there was no transaction involved) - but that's irrelevant to the actual code - I'm sure I can hook this up to a SQL Server backend and it will work just as expected.
That really makes it sound broken.
 
@SimonAndréForsberg now if I copied the whole Java script into my IDE would it normally just compile to do exactly what this does?
 
@RubberDuck no clue where you took that quote from ;)
 
6:51 PM
TS^
 
TS^
 
Meta TS^
 
^that
 
Anyway. I'll try to look later, but who knows, maybe @ptwales will show up first.
 
java lambda syntax is arg1,arg2,arg3 -> { } right?
or are they only able to be singular expressions?
 
6:54 PM
@Phrancis Yes, it should do exactly what that does
@DanPantry (arg1,arg2,arg3) -> { }
 
@DanPantry Care to clarify what you mean exactly?
 
or, if you only want to use one statement then you don't need the { }, just write the code directly
 
@SimonAndréForsberg and I'm assuming you can supply the () if you want a zero-arg lambda?
 
such as (arg1, arg2, arg3) -> arg1.do(arg2, arg3)
 
OK thank you, I'll tinker around with it this weekend
 
6:55 PM
@DanPantry correct
 
if so that is quite literally Ruby's lambda syntax lol
 
@RubberDuck LOL
 
@DanPantry I guess it's quite hard to innovate new lambda syntaxes (Python doesn't count), although I think it's a good think that they re-use the same syntax as other langauges
 
@SimonAndréForsberg Python's lambda is just an expression that is wearing fancy dress :(
 
6:57 PM
@Malachi Seriously, why do I have to justify the fact that we need version control software?
Free software, I might add.
 
@Phrancis click click click
 
@RubberDuck legacy software in my work uses SVN. It's really painful
 
Which will actually be a huge pain in the ass because it's opensource.
 
@RubberDuck SVN is fine and all but not when you put EVERY SINGLE SEPARATE PROJECT into one folder and version it all together
 
Where I work opensource == evil
 
6:58 PM
Not to mention we have VS12 with TFS integration, it makes no sense to not use TFS when it's so useful and we already have it there for us
 
We're using nothing right now @DanPantry.
 
I am in the middle of trying to figure out with folder holds the Current production code and also which version of Visual Studios it works in....
 
@Malachi those two memes combined... might collapse the universe
 
so I can change something that I should be able to change in a db table. but this site is so old they didn't do that back then....
 
@RubberDuck: My boss suggested .rar/.zipping up project files and time/dating them. I feel this is only slightly worse than what you have. So I feel for you.
 
6:59 PM
That's more or less what we're doing.
 
@DanPantry that is pretty much the same same thing, only with less bells and whistles
2
 
Nobody can work on the same project at the same time, regression all over the place.
I think I need a smoke. bbl
 
lol
 
@Malachi except those bells and whistles actually make it practical :P
I'm going to assume jUnit is the main test framework for Java
 
@DanPantry Would be a great assumption ;)
 
7:04 PM
maven = magnets
how do they work
maven install maven build I guess
maven test for testing, I hope to god it works out I'm using junit
the one thing that frustrated me about maven was all the Xml but also that it seems to be incredibly bloody dumb
 
If you're up for a challenge, I would go with Gradle
 
I was using Gradle
 
I think it's way better than Maven, but has less mature support in IDEs etc., yet it does work.
 
stopped using it because it didn't natively support git repositories as dependencies
and the plugin that DID support it was also dumb
 
Yeah... Gradle is a challenge to use
 
7:05 PM
Eclipse.. why?
is that really necessary
 
I'm happy I got my first handmade web server/service code done... Only thing left i sto implement a SE chat bot and a github post hook
 
well done :)
 
@DanPantry why not?
 
@SimonAndréForsberg: I'm already aware i have src/main and src/test etc
I don't need to see it twice
 
What if you put a file at src/wronglocation ?
 
7:08 PM
sounds like you put it in the wrong damn location ;)
why on earth does eclipse not have a ui for adding dependency repositories
 
sounds like you're complaining a lot today @DanPantry
It does have an UI for that. Right click project -> Maven -> Add dependency
 
@SimonAndréForsberg It can add dependencies, not repositories
@SimonAndréForsberg Also, I'm British. Complaining is our country's export
 
@DanPantry Are you sure you're not mixing it up with Sweden?
 
@SimonAndréForsberg I'm not named after a desk, so yes, 100% sure
 
Named after a desk?
 
Considering how nearly all things you want to add as a dependency are at maven central, there's often no need to add a repository
 
There is for Bukkit :(
 
Well, that's Bukkit :)
 
I haz a bukkit
 
I waz doing Bukkit pluginz
Although only one is released
And it's code is quite crappy
 
7:15 PM
I was making one called Meridian which was a rather poor attempt at invoking callbacks at certain times
It had iso8601 timestamps and fully qualified java references in a config file to determine what to invoke & when
never really saw the light of day cus it was pretty awkward to use
 
Seems like my plugin is still out there, don't know if it works with the recent Bukkit versions though: curse.com/bukkit-plugins/minecraft/creepermess
 
@SimonAndréForsberg did you happen to hook it up to MCStats? e: nope. aww, stats would've been neat.
 
I was going to make a website for Minecraft, actually, but it just felt like I was re-inventing the wheel, so I didn't
was going to do something with html5 canvas and region files
but then i realized a) it's already been done and b) just how memory intensive that would be to be done in Ruby
at the very least you would be dealing with 21 * 21 * (16 * 16 * 256) blocks
 
@RubberDuck the more I think of it, the more I think I should make SqlCommand a static class
 
obviously it might have been better to implement frustum culling but even the memory usage alone would make the project unviable imo
 
7:19 PM
@Mat'sMug A module or a default instance?
I wouldn't use a default instance.
 
@Schism Nope, barely even knew about MCStats back then
 
Then again... VB6 is single threaded, so it might be ok.
 
the problem with a VBA module, is that any public function becomes visible as an Excel formula
 
Not sure.
@Mat'sMug And there's that.
 
default instance is what I want :)
 
7:20 PM
ah. tits. that's not what I meant to implement.
 
extends JavaPlugin or extends Plugin perhaps?
 
JavaPlugin, yup[
also, why on earth
is eclipse doing this
I don't want to put my classes inside gitroot/plugin/src..
If I did I would have specified that. put it in gitroot/src dammit
 
1
Q: AngularJS - Google logout directive

VitalyBOur application needed a function to sign out of Google. Unfortunately, there is no such API and I was forced to use an iframe to: http://accounts.google.com/Logout and a polling mechanism to see when the operation is complete. I had a lot of doubts whether to put this code in a directive or in ...

 
So...... I'm thinking that since we're more than likely going to use a network drive for a repository, SVN might be the way to go. Thoughts?
 
@DanPantry never seen that dialog box before
@RubberDuck Git git git git git git git
7
 
7:30 PM
@SimonAndréForsberg Right-click project -> Team -> Share Project -> Git
 
Yes, I know Dan :)
 
0.o
 
@SimonAndréForsberg Ever set up a repo on a network drive?
 
@RubberDuck erhm... nope.
 
I mean, I'll take your word for it. I like Git. They're just not going to pony up for a repo server.
 
7:32 PM
10
Q: Push git changes to a shared network drive

user1549303How can a team of four people use Git (specifically Github for Windows) to push local changes to a shared network drive? Right now (without Git) we have to copy the files from the network drive to our local machine, edit the files, and then re-upload them to the shared network drive. This is a ...

 
^
Basically it
 
That looks easy enough...
 
I did that with my MVC project to get it hosted on our inhouse dev server
it is! surprisingly
You don't have to use a bare repository but git will scream at you if you don't
 
It looks so simple I should have actually been able to figure it out myself
 
the trickiest part will be getting the absolute network url and setting that as the remote url
git init --bare
cd /your/local/git/repo
git remote add inhouse X:/path/to/bare.git
...wait i fked up
after that you can just treat it like a normal repository
 
7:35 PM
Okay then. I won't mention SVN at all. I'll recommend either going with bitbucket or using a network drive.
Thanks guys.
 
np. bitbucket's cool I gues
s
i need to remember you can edit your posts, damn
Uh
isn't there a shortcut in eclipse for a quick fix or something
like with resharper in visual studio if you get red line of death you can press ctrl-space and get a context menu to choose an appropriate action to fix the issue (i.e, 'move to new namespace', 'resolve X class from Y namespace')
Ctrl+1 nvm
 
@DanPantry I normally simply use F2
 
f2 is javadoc on my pc
I just changed it to ctrl+space, every other keybinding so far is how I remember it in visual studio
 
It is Javadoc as long as there's not a compiler error there
 
ctrl+# for commit for example :) but that sucks because it doesn't seem to work while you have focused the source window
 
7:39 PM
ctrl + space is autocomplete...
 
not any more it isn't :D
 
autocomplete is tab for me
Huh. maven didn't recognize my test
 
I can't believe our email server let that into my inbox
 
@Phrancis Bad filter, bad filter.
 
7:45 PM
It's very important. That's why it got through!
2
 
^TS
 
@Phrancis RSA^!
 
Danke :)
 
@Phrancis Thanks to you I'm at +185 rep for today
 
Nice! And, you can still go up to 300 since bounties are not factored into your rep cap!
 
7:49 PM
@Phrancis Yeah but I don't think I'll reach 300 today. I'd be happy enough with 200
 
Ah yeah, it's getting kind of late where you are
 
@skiwi TSG the whole process
@SimonAndréForsberg I am 35 behind you
 
@SimonAndréForsberg capped yet?
 
prntscr.com/4ffb1q eclipse looks so much nicer with muted colours and no bolding
 
@Mat'sMug 5 more :)
 
7:54 PM
is this really a bad answer, that no one would upvote it, or is it because it's a @syb0rg competing answer?
0
A: Is this timer efficient?

Malachithis Method is kind of ugly void timer_update(Timer *timer) { unsigned long now = get_ms(); struct timespec required_sleep, rem; if(now < timer->tfinal){ required_sleep = ms_to_timespec(timer->tfinal - now); timer->tfinal += timer->step; try_to_sleep: ...

 
86 to 20K!
 
^wow
 
@Mat'sMug Awesome!
 
@Mat'sMug That's 86 too much!
 
76 now :) thanks @Santa!
@SimonAndréForsberg and about a month too late!
 
7:57 PM
@Mat'sMug You can call me Simon
@Mat'sMug Yes! Although let's not have any more races for a while!
 
@Mat'sMug NICE!
 

« first day (475 days earlier)      last day (3544 days later) »