« first day (327 days earlier)      last day (3676 days later) » 

12:00 AM
Not sure... but, I think a thicker skin is needed on the 'net
RELOAD!
Hey @200_success
 
+1 It's never too late to shoot a zombie! — Mat's Mug 15 secs ago
 
You want to see something entertaining? :::
rolfl -> http://codereview.stackexchange.com/users/31503/rolfl?tab=reputation
200_success -> http://codereview.stackexchange.com/users/9357/200-success?tab=reputation
palacsint -> http://codereview.stackexchange.com/users/7076/palacsint?tab=reputation
See how much rep in the last couple of days?
Like we need a holiday or something.
 
@rolfl Find a good zombifying question, start a bounty on it. You just put yourself anywhere between a -50 to -500 "handicap" for the day...
 
Truth is, it appears that I have been 'crazy active' on CR, and I caught up on a few things this week.
2
I actually have some JDOM bugs to address as well....
Actually, truth is, I have had some nice successes at work which are keeping me on my toes.... no good success goes unpunished, it seems.
Now I get to tell a bunch of people how a small change to their design will make a huge difference.... and I know that the more senior folk will be thinking 'duh, that's obvious'.
and the people who designed it too.... but, I have been there, and, well, it is easier in hindsight.
@Mat'sMug - be careful here:
 
12:16 AM
hmm perhaps careers.stackoverflow.com should be my first search...
 
@rolfl Hi
 
Hey, Hay, Straw, Grass, whatever.
 
Partly it's that I've been worn out by the climb to the top. Partly it's that there haven't been as many interesting questions lately.
 
You know what's not fun? Writing really complicated code that you can't test whenever you want because you don't have a machine to put SQL Server on...
Today at work, I had 15 minutes of downtime, so I got to test this code for the first time... two major problems...
 
@rolfl I started a voting week (instead of writing) while I'm reinstalling my desktop
 
12:27 AM
@nhgrif You can't put it on your own machine?
 
I have a Mac.
So, no.
 
oh.
 
Just me being stupid.
Never mind... duh.
 
12:42 AM
@palacsint I know you worked hard on the zombie-queue, but I have made things worse... I found a bunch of android questions that should have been tagged as java, but were not.
So, there are now some more revivals and necro's to get.
 
Hmm... just as I'm about to get an offer for a new salary, Careers2.0 gets a job posting for an iOS job in my area...
 
ok so I did something .... let's say dumb, to get my highscoresManager to work in Microsoft XNA and now when I try to export it into MonoGame (Xamarin) what I did is holding me back and I am not sure how to fix it....
 
Are you familiar with "scratch"? Sometimes it makes for a pretty good starting point.
2
 
@nhgrif maybe with the HighscoreManager.
 
0
Q: Java interface design and implementation

LisaSo I'm trying to design a binary relation interface in Java and then implement it, but I'm not sure if I'm doing it right. I'd really appreciate a little feedback just so I know if I'm way in the wrong direction or not. This is what I've got so far- Interface: public boolean compare(Object ...

 
12:59 AM
I don't know, I need to figure out what I did to make it work and then make it work again or in a different way. I have the main game class entwined in itself so bad right now.....
 
M... V.... C.... ?
 
not a browser game. it's an XNA style game. could I even do it the same way?
I don't know if I know what I am doing enough to rebuild it MVC style
 
0
Q: GCode phaser Optimize code

user3280423Here's the start of my GCode phaser program I think I'm using to many List(Of String) which will later slow down my program is there any other way to implement. I need to return a structured array so I can call to it anytime Ex: if I had [Block6]G0 X-43.2178 Y14.9604 Z4.89 After processing i...

 
^ I'm not sure why the user created a new question just to make a change, but whatever.
 
Back so soon?
 
1:14 AM
Yeah, that's what class usually lets out. Well,, earlier than that, but I have to walk.
 
1:27 AM
damn! ugh
 
That's OK, there is always this: codereview.stackexchange.com/questions/tagged/…
 
wrong shot
 
The previous one was better (but was it yours?)
 
yeah, I'm sending from my phone to my gmail to my computer to chat...
 
So it works on your phone.... that could be a problem.
 
1:33 AM
I downloaded it from the Play Store
 
0
Q: Credit card verification: string conversion most optimal?

AndyBelow is some code which verifies a credit card number using the checksum as well as check if number of digits are appropriate as well if digits start with right numbers. I am not sure if converting the double into a string was the best bet. I wasn't going to at first but had trouble figuring out...

 
there
I was so close to get the darn 4096!!
@rolfl and yeah, it is a problem!! ;)
 
hi Mat
 
hey @Sham! Have you tried 2048?
 
what is that?
no i didnt
 
1:44 AM
@Jamal Because he is creating a Phaser you know like on Star Trek?
 
@Malachi Uh, yes. I do see that it has an undelete vote, but now there's no need to undelete it.
 
@Sham then don't. It's dangerously addictive!
 
@Mat'sMug when do we think of using C# and Java, because both are OOP paradigm languages. Why C# is famous in market when Java is already famous?
 
@Jamal I didn't cast that undelete vote...lol I was just replying to chat...lol
 
@Sham famous is a perception.
 
1:47 AM
@Mat'sMug I know you use C# instead of java
 
Until I met a Java monkey I couldn't tell car from carpet (Java from JavaScript)!
that's my background, I've always worked with Microsoft techs
 
(OK, I am bias... but ....) C# is set up quite similarly to Java, but, it is more closely integrated in to the operating system. This means that, if you are programming for only a Windows system, that C# will likely give you better results.
If you are programming for a more general audience, then C# is not a useful tool at all.
On the other hand, Java is.
 
@rolfl What is your perception>
 
So, if you are talking to someone who's been 'hooked' by the MicroSoft cool-aid, then write C#.
 
@rolfl I'd say not a useful tool at all is a stretch
 
1:49 AM
If you are hooked on Mac, write ObjectiveC.
If you want iPhone, use ObjectiveC as well (I think).
 
if you're hooked on LSD, write PHP
6
 
If you want all of them (except iPhone, I think....) write Java.
 
@rolfl don't get hooked on Mac or iPhone
 
I am not.
 
@Mat'sMug technically, what does C# do on windows that java doesn't, if u dont consider .NET(which i dont know what it is)
 
1:51 AM
@Sham - my job is writing software for 'big systems'. For me, anything less than 128GB of memory is 'small'.
My choices are Java, C, or C++. That's it.
(or interpreted like python, etc.)
 
@rolfl are you python programmer?
 
No, I hate it ;-) it is a white-space language.
 
white-space?
 
For 'small things' I write in bash or perl.
(actually, tcsh)....
@Sham - in python the amount of white-space you have is significant.
 
@Sham .NET is the API (system run-time library) used by C#.
 
1:54 AM
@rolfl for big systems multi layered, on which layers do u fit java and which layer do u fit C/C++?
 
.net is the framework - it's the Common Language Runtime (CLR) which executes Intermediate Language (IL) code, which is what C# is compiled to. It's also the Base Class Libraries (BCL), a rich set of namespaces (of which only a subset is Windows-specific) that provide a wealth of objects and interfaces to write your code with.
 
If I have to count spaces to understand the language (and hope they are not tabs), then I am done for.
5
 
@rolfl oh you mean, you have struggled with indentation errors in python?
 
I Love SEMICOLONS!!!
 
@Sham yes..... especially when some wise-crack uses 'tabs' instead.
 
1:56 AM
C# has some language features which Java doesn't (e.g. 'delegates'). The bigger difference between C# and Java is probably the set of APIs (library classes).
 
@Mat'sMug what is the extension that you get when you compile C# file?
 
.dll or .exe
 
.dll or ^^^^^ that
 
@rolfl i faced this issue yesterday with one python program
@rolfl no idea how to resolve so when to interactive python mode
went*
 
1:58 AM
@Jamal How is that supposed to make me feel .... ?
 
so if it is .dll or .exe, what does .NET take as input which is intermediate code?
 
@rolfl I don't know. I just looked up "Monkey vs Python" and found that.
 
Especially when I took that python code, peed on it, fed it in to the shredder, and then ate it (with a banana).
 
@Sham as for python, vs. Java, it is no surprise that there is jython.... to make it work.
 
2:00 AM
basics of python looks unnecessary cryptic, if i get into internals of it
coming from java backgorund
python says everything is object, but when i run this 'x = "abc" then y="def" then print(id(x), id(y)) then y="abc" then print(id(x), id(y))' i see different result. python is tryint to simplify things at presentation layer, despite everything is object in python
different mean non-obvious result
 
think of id(x) == &x in C
 
@Mat'sMug My point was why the software industry gets divided using C# on one side and java on other side, it helps neither to the company nor job seekers
 
0
Q: Do my unit tests follow best practices?

Marco PetersenI've watched quite a few videos and read a couple of articles on unit testing and I've tried my best to make this test case as good as possible. Where can I improve this test case? I should probably add that SM2Scheduler is an implementation of the SM2 algorithm, which is used in flashcard softw...

0
Q: Finding a zero crossing in a matrix

Seanny123I am trying create an algorithm for finding the zero crossing (check that the signs of all the entries around the entry of interest are not the same) in a two dimensional matrix, as part of implementing the laplacian of gaussian edge detection filter for a class, but I feel like I'm fighting agai...

 
@Sham I would foster my Java if I had to work with Java.. but I like delegates and LINQ too much to prefer Java over C# ;)
 
@Mat'sMug Many companies use C# in middle-east area, where as colleges teach Java as part of curriculum which is similar paradigm. learning C# syntax would need extra time again and cumbersome.
 
2:07 AM
A world without delegates is cumbersome
 
i did not get u, "but I like delegates and LINQ too much to prefer Java over C#"
 
I think you could train a decent C++/Java programmer to use C# pretty fast. Library knowledge obviously takes longer, but eh.
 
C# is developed/controlled by Microsoft and is more tightly/richly integrated with Windows.
So if you want Microsoft-only code, use C#.
 
@Yuushi for the id() part yes, it prints different addr first and same addr later, this is not obvious, right?
 
@Sham A lot of languages will do "string sharing" under the hood. If you change y, then it will get a new address, and will not modify x. To be fair, you don't really every need to -care- in Python about these sort of details
@ChrisW Well, you can still run it on Mono...
 
2:11 AM
@ChrisW I understand, all C/C++/C# can be maintained from single IDE like VStudio which makes life easy.
 
@Yuushi Does anyone do that?
 
@Sham The IDEs are very similar (have the same UIs) for C++ and C#.
 
seems to be some around
 
@Yuushi i repeatedly see this statement 'you don't really every need to -care- in Python about these sort of details' said by python prog, i dont know how valid is this
 
2:12 AM
@Sham - out of interest, if you want to work on server systems, then your language choices are limited. If you want to work on mobile systems, then your language choices are limited. If you want to work on MSoft systems, then your language choices are limited.... but, with any of C, C++, and Java, you can do all.
 
@Yuushi So 'no' then?
 
I don't know, I don't pay much attention to the C# ecosystem. I use it to stuff around with F# on OSX, but that's about it
 
Why am I involved in this....
far too biased.
I know java, I like Java, and, when it does not do what I want it to do, my choices are C or C++, never C#. But, that's my situation...
 
anyway, language wars are pithy. One thing we can all agree on, however, is that Vim is better than Emacs
walks away
 
@rolfl i would look into the intention by which any technology is introduced, if am not wrong, gates has introduced C# after java started capturing market very quickly, he want his share or may be am wrong
C inventor or linux kernel inventor intentions were very clear
 
2:17 AM
18
A: What is the history of the creation of C#?

NickSemicolons are mathematically proven to make your language at least 9% sexier.

 
@Yuushi I agree ... sticks around
 
i dont about java, but i think their was no rival before java cam into market
 
@Sham If C++ had remained the only programming language for Windows, that would have hurt Windows market share (because C++ is relatively difficult).
C# is easier to use than C++ (and now, on Windows, has better APIs than C++ for general-purpose use)
 
@Sham - as far as I know, two features in Java precipitated its success.... the GC (which won a lot of friends who were strugling with C/C++), and the multi-platform support
Those two features were not available (together) in any other 'real' language at the time.
 
multi-platform support wasn't fantastic in the early days...what was it, "write once, debug everywhere"? :)
5
 
2:20 AM
@ChrisW this is what i thought to clarify, are technicians running behind technologies which want market share? dennis/linus didnt think like this before they wrote their technologies.
 
@Yuushi Multi-platform support sucked to start with, but, it was vastly better before C# came along.
 
@Sham I don't understand the question. Microsoft wants its Windows to keep its market share.
 
@rolfl I know, I'm just stirring
 
@chrisW yes i mean microsoft wants to force customers to use eindows platform
windows*
 
Other people who develop software want market share (for their software) too.
 
2:22 AM
@Sham - force is the wrong word.
Microsoft wants to make money. They do that by selling stuff. Mostly corporate licenses, and hardware like XBox and keyboards ... ;-)
Anything they can do to get your money is done.
 
@Mat'sMug i saw the answer for history of C#, answer is a bit interesting 'Semicolons are mathematically proven to make your language at least 9% sexier.'
 
Customers like Windows because it's easy to install/use. Developers like Windows because it's easy to prgram and has lots of customers.
 
and companies like windows for the users, because it is cheap and commodity... but that is changing.....
it is changing because the functionality is no longer needed to run on the PC, it can be found 'in the cloud'.
Nowdays your corporate exec can get by wit a decent assistant, a tablet, and a phone.
 
@rolfl until that is illegal, get microsoft earn money, but the catch is, microsft make customers to use windows platform, software companies think of microsoft technologies to write apps on tis, and technicians are trapped
 
I am not trapped.
I am in an area where skills demands are growing, implementing all the things that are moving away from the MS 'world'.
 
2:26 AM
trapped in the sense, no idea why one has to learn C# on one side, when java is other side or viceverca
 
nothing forbids learning both...
 
@Sham if you want to succeed in the indsustry, you have to learn a language... you don't hav to keep that language.
My first language was turbo-pascal.
 
(thinks it was COBOL but monkey won't say)
 
that's everywhere in the technology world: django vs rails, mysql vs postgres vs sqlite vs sqlserver, etc
 
Then PowerBuilder, then Visual Basic, (there was some COBOL training, Adabas/Natural training, VMS, MVS, etc.).
then SQL, and Sybase.
From there to Java.
 
2:28 AM
@Mat'sMug there is a problem in learning multiple languages of same paradigm, i would prefer learning another language which is of different paradigm, BTW i dont support java/C#/...
 
Oh, also perl, shell, fortran, and... let me think....
HTML, (is that a language...?)
early javascript (I gave up on that).
 
@Mat'sMug Dont you think it is redundant?
@Mat'sMug i would love to learn python/scala which gives me functional paradigm approach, whcih will help in my design issues to solve better
 
The point is, I don't have C, or C++, and I regret that. I don't have .net/C#/F#/VBx .... and, you know what, I don't regret that.
 
that's kind of like saying Haskell is redundant because of ML, or Ruby is redundant because of Python, or ...
 
Oh, I have some C for PIC Microcontrollers, along with some assembler.
Also, VHDL in there too.
(no STDLib on the PIC, so it does not really count as C).
 
2:32 AM
@Mat'sMug I think it affects his/her job, i want to move to middle east, but middle east companies only speak C# .NET
 
That's simply not true.
 
SL-1, x86 assembly, C, C++, SQL, C#, HTML+CSS+JS
@Sham There are different O/S too.
 
hahaha
 
There's gorilla vs. shark, too.
 
Google to the rescue.... look here: bayt.com/en/international/jobs/roles/technology-it
Jobs in the middle-east.... Java hit and web developer before any C#
 
2:35 AM
@Mat'sMug i would love to C# if it came before java and then think of what to do
that was my idea
@rolfl r u saying middle east is good for java programmers?
 
@Sham sort them alphabetically, C# does come before Java ;)
 
hahaha
 
@Sham - not what I am saying... I am disproving your statement: "but middle east companies only speak C# .NET"
 
oh is it?
 
There is an asp.net position available.... ;-)
@Mat'sMug - there is one for you: http://www.bayt.com/en/job/programmer-in-saudi-arabia-3031701/ check out the skills:
Positivism towards supervisor criticism
Adherence to Company's Policies & Procedures
 
2:39 AM
@Mat'sMug How would you feel using java JNI to connect java with C/C++ code and write multiple paradigms in single application instead of using CLR in MS world
 
nauseous
 
am bad at english, i need synonym
 
sick
 
He'd feel "bad" about it.
 
I'd be F'd ;)
 
2:40 AM
@Mat'sMug am asking about technical impact not biological?
today he is struggling and looking like a peanut technically in front of google
despite he is #1 richest in world latest
@Mat'sMug Google is famous today becasue google did not take gates approach to snatch the market share, gates worked like carlos slim of Samerica who snatched major telecom sector
 
My experience is in companies that have an IT department, like retailers. The type of code written in these companies ranges from VBA/Excel macros to public ASP.NET MVC Web applications, but it's always focused on one thing: data. I haven't been exposed to functional stuff, thus I don't see the need for it. Maybe it could help me become a better programmer, but I don't have time to devote to this for now. Too busy playing 2048 ;)
 
@200_success am learning python, very cryptic details, if i go to internals
 
@Mat'sMug What's "functional" stuff?
 
non-broken
 
@200_success i think you are right person to answer functional stuff
 
2:47 AM
Is there some reason you are pinging 200_success?
 
python isn't really what I would class as a "functional" language...
 
I've seen posts here and on SO using delegates to write C# in a functional style, that's what I meant.
Never touched F#
 
@200_success he adviced me to learn it as am a loser working for support past 10 years, he is guiding me to get into from-scratch dev
sorry above msg is common to all
 
@Sham - I agree with that advice... the only real career growth opportunity from a support position is to go in to management.
or, to change your skills.
 
mgmt profession is unethical as per my percep
 
2:50 AM
The career path for a software programmer is typically more open.
 
my path is atypical
 
atleast in software, unless you manage puredev
 
What language you choose to start with, is not likely going to be the language you end with... so, it is not as big a decision as all that.... you can change later.
The truth is, that most programming skills you learn in one language are transferrable to other languages.
6
Learn the 'core truths' of programming, and go from there.
 
despite i was in support i had enough touch with C/Java and new to python
 
If you have identified that C# is a good language to learn in your region, and it will be easier to transfer out of your support role sooner with C# than some other language, then do it.
You have bigger issues than the fine details of what language is best.
 
2:53 AM
@200_success i had one query in python, do u think i can ask u now?
i need to leave now, it is office time
thanx all bye
 
bye!
 
cheers
 
3:05 AM
@rolfl I'd got a little further: unless you quit pretty quickly, there's almost no chance you'll use the same language for an entire career. Being a little older, I've used even more languages than you've listed (going all the way back to Fortran).
 
hey, I included Fortran ....!
(but that was not my first.... or even 'early'.).
My fortran experience was converting an actuarial function written on an MVS System in to SQL running in Sybase.... ;-).
 
@rolfl I guess I must have skimmed over a message or two and missed that. When I did Fortran, it was pretty much the primary language on that machine (a Control Data mainframe).
 
Sounds about right....
To put my career in perspective.... one of the first tasks I was given in my first job, was to install windows 3.11 for workgroups on a system running a token-ring network.
It was the first 3.11 install in the building.
it came on 5 1/4 floppies.
That was all so that I could get a 3270 emulator up and running because they did not have a temrinal for me.
 
@rolfl Hmm....the first version of Windows I installed for work was Windows 1.03...
 
this is like watching a one-up of "I'm older", "no I'm older" :P
 
3:10 AM
Yeah, I was 'fresh'.... early 90's out of university
Hey, I am happy at 41.... ;p
I was 'lucky' in that I was at a university in South Africa where we actually had the internet though.... there were only 4 of them.... because, most of South Africa was not connected to 'the world' even though they had modems and stuff.
By the time I graduated though, things had changed.
 
@Yuushi I'm waiting for the inevitable "You darn kids and your flashy C++11. In my days..."
 
.... yeah, I used to sleep between the columns of the classifieds... I used a full-stop as a pillow!
 
Well, I'm old enough to have played maniac mansion on a 286 that had a 5 1/4 inch floppy drive, so I guess I'm not really a "kid" in that sense :)
 
Nope .... but, did you play leisure-suite-larry?
 
nope, but it was certainly something that was around when I was growing up...some of my friends have played it
 
3:14 AM
Censored ....
 
My oldest computer was a... Dell Dimension L733r, with Windows 98 SE.
4
 
Found the Other Hard Drive. now I just gotta figure out what I want to do with it.... I should pull the hard drive from my laptop so that I can boot into it if I want to. then I can work on windows 7 stuff, I wonder if that would even work?
 
lol
3
^^^^ and star that!
 
@Jamal I remember Windows 3.1
 
@rolfl but hey, when I started getting older, the internet was big enough that it didn't matter...
 
3:16 AM
true..... I grew up without the net, but we had stones, mud, and tennis balls instead
 
I also had a computer that didn't have a hard drive only had 48k RAM it was a radioshack TRS-80
 
In fact, it took me until '97 or so when I moved to the UK for me to get the net at home.
 
jeez I have already starred like 4 things on this page of chat....I am going to be out of stars while I am at work tomorrow
 
trying to remember when we got it...I think it would have been around a similar time
I remember tying up the phone lines for hours to work on a crappy geocities page
and getting shouted at to get off the damn internet so someone could use the phone
 
@Malachi I could remember one PC game I used to love when I was younger: Hard Truck. I also remember my dad buying me Putt-Putt Travels Through Time.
 
3:18 AM
whew ... I thought you were going to say AOL.
 
@Jamal never heard of those games. I remember playing drug wars on DOS though
 
I do remember getting those free CDs. :-/ Yeah, they went in the trash.
 
I live in Australia, no such thing as AOL here :)
actually, that's not true
 
And, I am suprzed it was not the other way around ... "put down the damn phone, you just dropped the 'net"
 
there apparently is
I'm sure that happened a lot as well
 
3:19 AM
it would be Australia Down under = ADU
 
Yeah, well, now I sit at home with an internet connection that's way faster than the LAN I first build when I made myself a cross-over cable and plugged two comptuters together with laplink.....
so I could get my data over.
 
@Jamal Problem is: I'm almost certainly the oldest, but also probably the most excited about the flashy new C++11 C++14!
 
Have you done an age query on SEDE?
Mind you , I would trust the location data more than the age data on there.
 
not everyone lists their age
(I don't)
it's like a fun guessing game :)
 
@rolfl Nope.
 
3:22 AM
@JerryCoffin Yeah, and you probably have a much better idea on how it works under the hood. As for me, I like it because I can be "lazy" and not write out all the implementation. :P
 
@Jamal I definitely like lazy too...
Unfortunately, at work I can't even use C++11, not to mention 14.
 
I just turned 29
 
I still can't use all of C++11, unless I use Ideone. Installing Visual Studio 2013 is gonna be a hassle. I might just wait for C++14.
 
brb going to try and activate Hyper V again
 
@Jamal Even with VS 2013, you can't use all of C++11 (but it's definitely a lot closer than VS 2012).
 
@JerryCoffin I know. :-/ I at least want initializer lists, and constexpr would be nice as well.
 
@rolfl Looks reasonable enough (when I said "oldest", I was really only talking about us here chatting at the moment though, not Cr in general).
 
I figured that much, but then I got interested ;-)
 
@Jamal Initializer lists are definitely handy, not doubt about that.
@rolfl Fair enough.
 
@Sham You could ask your question here, but you might get a better answer on Stack Overflow.
 
3:49 AM
Why, why wasn't this asked over here?
179
Q: Too many 'if' statements?

TomFirth84The following code does work how I need it to, but it's ugly, excessive or a number of other things. I've looked at formulas and attempted to write a few solutions, but I end up with a similar amount of statements. Is there a type of math formula that would benefit me in this instance or are 16 ...

TTGTB - good night!
 
4:26 AM
Once CR is out of beta, we should all vote to migrate it.... MWA HAHAHA
 
 
1 hour later…
5:37 AM
0
Q: GAE datastore JOIN + GROUP BY

Srinath GaneshI had posted this here and was asked to move it to code review since my code works and am looking for the best possible solution : original post NOTE : i have seen the JOIN in GAE related posts but GROUP BY in my requirements made me make a new post and I have made a solution of my own whic...

 
Sigh, went to refactor some code, but thanks to go's incredibly verbose way of doing first class functions, it actually ends up about the same length and no clearer
 
@Yuushi I have to admit that doesn't surprise me. I haven't been overly impressed by Go so far (to put it mildly).
 
5:52 AM
it has some good ideas, but at every turn, I keep thinking "I wish it had this..."
 
Now for tonight's zombie, though in all honesty it ends up more like an SO question than a real Code Review.
 
where this is generics, tuples, succinct lambdas, const...
heh, the footnote alone make it worth reading :)
 
@Yuushi Yeah--some cool things mixed with a lot of fail, yielding a whole that manages to do a lot right and still ends up as (IMO) nearly a completely failure.
 
@JerryCoffin Couldn't really have put it better myself
 
0
Q: How can I modify this query for performance?

Subin JacobThis is the stored procedure I'm using to list some places in my website. How can I optimize it to perform well? Which functions in query is taking much time for its execution? ALTER PROCEDURE [dbo].[PlaceListSelect] @cateID int, @searchTxt varchar(50), @userID int, @RowIndex int, ...

 
5:56 AM
First C question I've answered in a while, and it says at the end "I can use C++ if it would make it easier"
1
Q: Counting occurrences of values in C Array (Shannon Entropy)

JoJoeI have written the following C code for calculating the Shannon Entropy of a distribution of 8-bit ints. But obviously this is very inefficient for small arrays and won't work with say 32-bit integers, because that would require literally gigabytes of memory. I am not very experienced in C and do...

yes, yes it would, and I will gladly take that opening
 
@JerryCoffin: Revival!
 
6:33 AM
I'm honestly and truly ashamed of this code :(
 
7:04 AM
0
Q: Genomic Range Query

Ming-ChenRecently I worked on one of the Codility Training - Genomic Range Query (please refer to one of the evaluation report for the detail of this training). The proper approach for this question is used prefix sum. Here is the implementation: int mapping(char c){ if(c == 'A') return 1; if(c ...

 
7:22 AM
@Jamal Oh no--I thought I was killing a zombie, not reviving it!
 
Haha. It is sort of confusing. But I guess you're reviving it, then killing it. Something like that.
 
Morning people, Night @Jamal
 
Food, then shower, and then bed.
 
morning
today more active day, as I'm at work
 
@rolfl Regarding Java... there's two things you can do if you want to target iPhone. a) Use XMLVM to "de-compile" your Java bytecode into Objective-C source code. b) Use PlayN (assuming we're making a game), and Xamarin (not free!)
 
7:39 AM
Morning!
 
Well, I need to go sleep. Later all.
 
@Jerry Wait
There is one minor point I didn't see in your C answer.
That /= statement will implicitly round to an int.
You need to add 0.0 to length so it will be fixed.
@Yuushi You could mention that at well, it should be noted in a review.
 
@syb0rg You mean in his code? ProbabilityOfX is defined as an array of doubles, so I don't see why the /= would round to int.
 
@syb0rg his code should be ok. Mine is missing the cast, though
thanks, fixed that up
I didn't test this code at all, i just wrote it out, so i'm not surprised it has bug(s) in it
 
So busy here
 
7:51 AM
So many C questions I can't answer :(
 
@Mat'sMug You like delegates and LINQ too much to prefer Java over C? coughs Java 8 coughs
 
@JerryCoffin That std::accumulate expression looks like something I'd write :)
 
@Yuushi It does, doesn't it? Well, I needed to go to be a while ago, and I really need to now. Later.
 
later
 
8:10 AM
'morning everybody :)
 
'morning
 
0
Q: Sorting a PHP array in a discontinuous manner

xyzMakiI start with an array containing some 'ids' and some 'values'. What I need is to organize the 'ids' in a new array to be, if possible, apart when the 'values' they are associated with are alike. So I came up with a solution. If there is too much of a value type, the spreading is uneven. So if...

 
morning @Morwenn
 
@skiwi Hey.
Did I miss something during the the last 12 hours?
 
@Morwenn some starred messages, some bananas, some monkeys, nothing out of the ordinary.
 
8:21 AM
Oh, ok.
 
@SimonAndréForsberg Interesting Java 8 question, which I just thought up:
0
Q: How to declare Functional Interfaces in static helper classes?

skiwiGiven I have the following structure already existing: private void acceptInner(final Path path) throws IOException { String newId = FileUtils.readAndModifyFileEntry(StageRename.ID_FILE, "id", idString -> String.valueOf(Integer.parseInt(idString) + 1)); BaseUtils.moveKeepExtensi...

 
@skiwi That one looks quite opinion-based to me.
 
@SimonAndréForsberg I'm not so sure, I'm wary of any pitfalls, which I do not know of... yet
((UnaryOperator<String>)MapperUtils::incrementAsInt).andThen(/*something*/) this would look ugly though
 
@skiwi Yes, that looks ugly. I provided a short answer for now. I'll load the code up myself and play around a bit
not sure what A::b does exactly.
 
That's a method refernce
It's pretty much a shortcut to a lambda, for an UnaryOperator<String> the method needs to take a String as input and to return a String.
Also, this happens when you go on a refactoring spree:
private void acceptInner(final Path path) throws IOException {
    String newId = FileUtils.readAndModifyFileEntry(StageRename.ID_FILE, "id", MapperUtils::incrementAsInt);
    BaseUtils.moveKeepExtension(path, StageRename.OUTPUT_DIRECTORY, newId);
}
Which used to be pretty hefty 30~50 line code.
and now I need to save my SO questions (used 3 already in an hour), for if I encounter a major issue during work and am hopelessly stuck... And I don't know of any good question anyway.
Hmm, random idea, would it be useful to have default class values? As int is 0 on default for example.
 
8:42 AM
@skiwi default class values for what exactly? I'm not sure it would be useful as I'm not sure how you intend on using them.
Hmm... by default class values, you might want to take a look at the Null Object Pattern
In object-oriented computer programming, a Null Object is an object with defined neutral ("null") behavior. The Null Object design pattern describes the uses of such objects and their behavior (or lack thereof). It was first published in the Pattern Languages of Program Design book series. Motivation In most object-oriented languages, such as Java or C#, references may be null. These references need to be checked to ensure they are not null before invoking any methods, because methods typically cannot be invoked on null references. The Objective-C language takes another approach to this ...
 
I'l check in a bit
I also need to look into some Logging framework cq implementation
I gotta log quite some stuff, but I do not want to bloat the code..
Those two requirements seem to not like eachother.
 
For logging, I'd recommend Apache's Log4j
 
That Null Object pattern is quite interesting I must say
But wondering where I would even need to use it... don't know atm
Does Ruby really not use semicolons but instead spaces...?
 
Don't know Ruby (yet)
I haven't used Null Object Pattern that much, but when I have used it it has been quite helpful
 
8:59 AM
Ah how lovely, my code was out of sync...
 

« first day (327 days earlier)      last day (3676 days later) »