« first day (392 days earlier)      last day (3620 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
>= 200 is enough.
No matter how you earned it.
(even scoring a 100 site-association bonus +10 votes.
 
interesting
RELOAD!
+1, very nice answer! (note to self: upvoting one's opponent in a rep race is kinda counter-productive)Mat's Mug 12 secs ago
 
SANTA!!!
 
no, just the cookies ;)
 
So, $400 worth of disks....
installed, and data migrating.
Sometimes you have to love the free stuff.
It does suck a little bit that I had to power off mys erver to install the new disks
But, I <3 Linux
 
Does the idea of singleton object exists outside of Objective-C, and if so, I wonder if their usage is as rampant as it is in iOS. I just saw someone recommend throwing an exception in dealloc in Objective-C...
 
12:08 AM
Singleton is pervasive in many (all) OOP languages.
Some hate, some love
 
Thanks, Santa!
 
Throwing an exception in dealloc is the worst idea I've heard in a long time.
 
is dealloc like 'finalize()' ?
(or C++ destroy?
(if so, what does it have to do with singleton?)
 
I don't know. It's called when the object is deallocated.
And it's never called by the programmer.
 
12:10 AM
Yeah, that sounds like finalize/destroy
 
In Objective-C, one of the singleton patterns uses something called dispatch_once, which allows the singleton to only be instantiated once in the lifetime of the application. The application must be restarted.
 
@nhgrif - if it's like other languages, it will swallow/ignore the exception, but it can be 'useful' if the exception is caught inside the dealloc
 
This means that if the singleton is ever deallocated, it can't be accessed without restarting.
Someone recommended simply throwing an exception in the singleton's dealloc so the program would crash if the singleton were ever deallocated...
You could throw an exception in your singleton's dealloc method, so that if anyone accidentally releases that object, the program will crash immediately and let them know they messed up. — Catfish_Man 55 mins ago
 
I would be surprised if the langage allowed that/behaved like that.
 
It allows it.
But... let me start by saying this... throwing an exception itself is generally bad practice in Objective-C.
 
12:14 AM
Oh, then exceptions in Obj-C are not the same 'sentiment' as other languages.
 
It's common place in other languages like Java, but in Objective-C, rather than a method throwing an exception, we'd rather the method take a pointer to an error object.
 
In Java you have exceptions, and System.exit(1).... it sounds like the Obj-C is more like System.exit().
 
And if the error object is non-nil, there was a problem.
If you throw an exception, you have to either catch it, or the app crashes, same as any language.
 
What happens if you try to reference a singleton after it has been deallocated?
 
Nothing. There's nothing wrong with trying to call a method on a nil pointer.
The app won't crash, you just won't get your data.
Assume your pointers to the singleton object are done right.
If they're strong pointers, the singleton can't be deallocated.
If they're weak pointers, they zero themselves out when whatever they point to is deallocated.
 
12:17 AM
OK. but, the unexpected data would be .... surprising.
 
If they're assign pointers, then you will crash because you're calling methods on a deallocated object, but you shouldn't use assign pointers.
The thing is, if his singleton is deallocating, he's doing something wrong in the first place.
But... despite this, there are ways to recreate the singleton object if he uses a different pattern to create it.
There's a pattern that allows the object to be created as many times as you want, but it's only created if it doesn't already exist.
The worst part about throwing the exception in dealloc though is that there's no possible way to trace the actual source of the problem.
All you know is that it was deallocated. But you could know that just by seeing that your weak pointers now point to nil instead of an actual memory address, and that doesn't crash your app.
If your app crashes even just once when being reviewed by Apple, by the way, it's an instant app-store rejection, so all the more reason to come up with other solutions than throwing exceptions.
 
Well, the whole thing sounds like it's a storm in a teacup... a problem in an area where noone goes anyway
 
Bad data won't necessarily get your app rejected, a crash definitely will.
 
I did not realize that apple had technical standards.
3
;-)
 
Section 1 is Terms & Conditions. Section 2 is where the guidelines begin.
2.1 Apps that crash will be rejected.
And they'll send you the crash logs when they tell you the app has been rejected.
 
12:30 AM
ugh. 4 votes left. gotta keep some for tomorrow's surprises!
 
Already? :P
Incoming question that can use an edit (and also closure or migration).
 
What, you have not done it?
 
0
Q: How do I keep a database of repo stats and user stats, in sync with github?

ThomasReggiHow do I keep a database of repo stats and user stats, in sync with github? I know that I can use curl https://api.github.com/repos/reggi/handwritten and curl https://api.github.com/users/reggi To get repo and user data. But what's the best way to keep that in sync with my database? ...

 
I could, but I figure you could this time, since I "stole" that one other edit already.
 
Yay! Zombie checkmark!
 
12:38 AM
I'm still waiting for one zombie checkmark. :-/ That OP hasn't been around since October.
 
hmm that one was from May 7th... young zombie
 
@Jamal I don't see much point in editing questions I just closed.
It just means that it hits the review queue
 
@rolfl Okay
@Mat'sMug Mine was posted in February, and the question was from last October.
 
I wouldn't keep my hopes high then...
 
I did get Necromancer, at least.
 
12:53 AM
....how come I don't have a tag badge yet? I have more posts and the same score as and yet I have the badge....
 
@Mat'sMug Oh, I know why. I believe a tag must have a minimum of 100 questions to be eligible for tag badges.
 
you're kidding me
I'll never get then!
 
0
Q: Is this a true backtracking algorithm?

Simion MitaSo my project was to make an algorithm that finds a path out the maze using "backtracking" to help. This is my first time attempting to solve anything with backtracking so I want to be sure if what I did is actually backtracking and if it is an efficient way to apply it to my problem. Bellow is t...

 
Found a beautiful bug caused by VB6/VBA's stupidity! codereview.stackexchange.com/a/52137/23788
 
FOund a C# answer .... that will earn me a tag badge ;-)
 
1:00 AM
damn how many tag badges do you have!
 
I think I get 2 more tonight
 
(2 votes left...)
ChrisW isn't gone, last seen 10 hours ago :)
 
I'm awaiting , but will take a while.
 
after I think my next one might be
I think I love to hate VB
1,005 profile views!
damn, I missed the 1000th
50 minutes to recalc right?
@konijn joining the race?
 
1:21 AM
0
Q: Can't get more than 50% CPU Gflops in matrix multiplication (cross post from SO)

user43443Cross-post from stack overflow since this is very code intensive Problem I am learning about HPC and code optimization. I attempt to replicate the results in Goto's seminal matrix multiplication paper (Google "goto anatomy of a high performance"). Despite my best efforts, I cannot get over ~50%...

 
2:05 AM
Hey, y'all. How's Friday night treating you?
@Mat'sMug VB?! Life's too short for that nonsense, brother!
4
 
haha
> Since the class doesn't specify Option Base 1 anywhere in the (declarations) section (just looked at the Google Drive link), it looks like there's a bug right here; you're systematically skipping index 0 - arrays are typically zero-based, and collections one-based.
1
A: Recursively searching the Windows Registry

Mat's MugThis is probably a typo: On Error GoTo ErrHandler: It should read as: On Error GoTo ErrHandler The : denotes a label, or separates multiple instructions on a single line, allowing you to write something like For i = 0 To 10 : DoSomething i : Next on a single line. Useful for the immediat...

 
'Option Base 1`
Just what I'm talking about. :P
x
 
exactly!
and still...
@ckuhn203 You're welcome! We need more vba and vb6 questions on this site, I hope you stick around! I've edited my answer to clarify on the error handling pattern. I'm not sure what you mean with allowing an error to occur though. — Mat's Mug 7 mins ago
:D
 
shudder
Some days I think I should just give up this technical stuff and go raise goats.
 
2:22 AM
Oh no. I get what you're trying to do. It's more of a Try...Catch...Finally-ish control flow, but I'm solidly against that design in VB6/VBA. There's not a jump in control flow unless there's an error. In that case, there should be a jump in the flow. In an idea VBA world, you should always exit on Exit Sub and never reach End Sub. I'll be around. We can debate this later with competing answers to a new question. — ckuhn203 1 min ago
 
Just for reference, if I'm in quicksand, I'd want somebody to help me get out, rather than helping me feel more comfortable sinking.
 
lol
2
 
Helping somebody write VB is like what Dr. Kevorkian used to do.
Not that I have strong opinions about it, of course.
 
TTGTB
'night @all!
 
ciao!
 
2:39 AM
0
Q: having trouble converting a jade file into html

GavinI'm trying to convert a simple jade file into a html file. I am getting a cryptic error instead: $ jade /tmp/test.jade /tmp/test.html /usr/lib/node_modules/jade/bin/jade.js:148 if (err) throw err; ^ Error: ENOENT, lstat '/tmp/test.html' This is what is inside the test...

 
3:08 AM
> You've earned the "clean-code" tag badge.
> You've earned the "c#" tag badge.
 
3:40 AM
> You've burninated the "clean-code" tag
 
0
Q: Which way should we direct VB6/VBA users to error handle?

ckuhn203I have had it mentioned to me several times that I am not using a proper error handling pattern in vba/vb6. I understand why a site with few VBA/VB6 users on it would think that this is the case, but it is not and I would like everyone to give correct advice on any posts within those tags. I unde...

 
4:22 AM
0
Q: Input Stat Tracker for baseball/softball games

luthier93I am working on code using the ginput function in MATLAB and an image of a strike zone to input actual data for baseball games. It works fairly well and does what I want except that the data isn't exactly correct. The main program uses a while loop to collect input data from the clicks of input ...

 
4:49 AM
0
Q: Custom linked list overloaded increment operator

InstinctI'm trying to implement a very basic linked list where I can use an iterator (which is a pointer to a node) to move through the list, printing each node's data. This printing loop works fine if for the third part of the for loop I say iter=iter->next but if I say ++iter it inserts a 0 before eac...

 
 
2 hours later…
6:48 AM
0
Q: How can I optimize my insert function for the cuckoo hash table?

user3369309I'm working on class for a hash table where collisions are corrected using cuckoo hashing, I had difficulty writing the insert function, the function is supposed to insert the key if the h(key) is available, if not it is supposed to find the shortest "path" for moving other keys in order to find ...

 
 
1 hour later…
8:11 AM
0
Q: v2 - Adding a duplicate entry randomly into a list in haskell using random monad

MichaelNext version of Adding a duplicate entry randomly into a list in haskell using random monad I wrote this trying to set up a Haskell testcase. The aim is to take a list and add a single duplicate from any place in the list to anywhere else in the list. I'm trying to learn to use the Random Monad...

 
 
2 hours later…
9:50 AM
Monking
Whoa, low activity here.
Oh, it's Saturday.
@Mat'sMug @ChrisW is gone.
> You've earned the "algorithm" tag badge.
 
10:27 AM
I got +184 yesterday, so close to cap.
 
Monking
@SimonAndréForsberg, you asked about Tesseract I saw yeserday evening?
 
10:57 AM
0
Q: Optimizing digit sum and product with GMP

Floris VellemanI have a bottleneck in my program at the point where I calculate the digit sum and product of a number. I am using GMP because I have to work with numbers that follow 1e8 < n < 1e80. To calculate the sum/product of a number I initially used strings thinking the division/modulo method would resu...

 
11:16 AM
Monking..
 
Hey everyone. :)
 
11:37 AM
Hey :)
 
Hey all heyers
4
A: Calculating infix expression with no parenthesis

rolflIt is common, when processing things like this, to use a chain-of-responsibility pattern. In this case, you can create an operator interface, or abstract class: public interface BinryOperator { public boolean isOwner(String operator); public double operateOn(double left, double right); ...

@rolfl I can't find the relation between BinryOperator and Operator there ^
 
Did you know that Alestorm is a pirate metal band that likes to reinterpret shitty pop pirate songs? :D
 
No :o I didn't know
a... pirate metal band?
pirate metal?
 
They call themselves a "True Scottish Pirate Metal" band.
 
Not Scottish Folkore combined with Pirate Metal?
 
11:41 AM
Lazytown - You Are a Pirate (Alestorm Remix)
 
Okay... Might not be my style :P
 
They also have a remix of the Pirate of the Caribeans theme song.
And a remix form a pirate Eurovision song.
 
I don't know yet what to think of Röyksopp, Robyn - Do It Again...
 
And also some original songs.
 
Especially at the "It hurts so much" part
I like Tenicous D - Tribute and Rize Of The Fenix aswell
 
11:49 AM
Tribute is so fucking great *-*
 
Also for random songs, Blur - Song 2
 
Also, this:
 
That one'll have to wait :P
I don't think I know it
I just notice my TCG has been forked :o
 
You don't have to listen to it. It's minimal electro without creepy images partly taken from black metal bands.
 
Okay...
Your music is interesting :P
 
11:52 AM
However, if you want something really crazy, there's Pryapisme - Un druide est giboyeux lorsqu'il se prend pour un neutrino.
 
Wow... the warning is in place :P
I've got 99 commits, but a bitch ain't one.
Close enough
 
That's the kind of video that makes you think "enough internet for today".
Or even "enough internet for the next three months".
 
Better I don't want it then!
 
Also, you better not fear epilepsy.
 
The randomness of my game is owning me at the moment...
We start with...
Field: Field([MonsterCard(Iron Slug, 4, 25, 25, HEALING), MonsterCard(Phoenix, 10, 10, 10, HEALING), MonsterCard(Engineer, 10, 10, 10, HEALING), MonsterCard(Craxy Ox, 15, 15, 15, HEALING), null])
And after fusion we obtain....
Field: Field([MonsterCard(Iron Slug, 4, 25, 25, HEALING), MonsterCard(Phoenix Engineer, 12, 10, 10, HEALING), null, MonsterCard(Craxy Ox, 15, 15, 15, HEALING), null])
 
12:06 PM
Monking again
 
Monking again @SimonAndréForsberg
 
@skiwi Yes, a friend of mine had an idea for a OCR application, so I wanted to hear how your experiences with Tesseract has been. Does it work well? Easy to get started with? Produce good results, etc?
 
@SimonAndréForsberg Depends on application, mostly yes - not that easy - usually
I need to hear somewhat more about what you want to do
Meanwhile my game just went into deadlock
I think fusion is working well: Field: Field([null, MonsterCard(Dragon Engineer Fire Imp Phoenix, 19, 19, 19, HEALING), null, null, null])
 
I just looked at a PHP question on SO. I'm quite glad I don't know the first thing about PHP, else I'd be tempted to try answering these trainwrecks.
 
12:34 PM
@skiwi take a picture of something, read some text and numbers and store them for later use.
 
@SimonAndréForsberg Still too broad unfortunately, what kind of text numbers? Paper scanned, handwritten, from screen, etc?
Yes it all matters :)
 
@skiwi preferably from a picture that has been taken.
Any experience btw with Tesseract on Android?
 
What are we talking about? Are you talking about reading alphanumeric text from images?
 
@SimonAndréForsberg Unfortunately not
Is it still digital text or handwritten from the picture?
 
12:38 PM
@skiwi digital text. not handwritten.
 
I'll be releasing a project on github in the coming weeks for exactly this.
Then it'll be really easy ;)
 
oh. cool
lol, yes. Just a matter of cloning the project :)
What license is your project?
 
What kind of information do you need?
I'm considering a license which prohibits commercial usage without consent
But I still need to think about that
 
My friend wanted to make it commercial, so that's why I'm asking :)
 
I'm sure something can be worked out for friends and like, for free and it would always be nice to get some cut if it really starts to work out... But again, I'm not experienced with those licenses at all
I much much rather have someone actually using the library, than not
 
12:42 PM
I thought I had one time seen an app that will let point your phone at a sign or something and it will real-time translate it straight on the video feed.
If you're going to try making money off a library, talk to a copyright lawyer.
 
What (I intend that) the tool will report is data in a tree-like structure with hierarchy of: Block -> Paragraph -> Line -> Word -> Symbol
@nhgrif Well it's just that the only thing that would hurt me a bit is to see someone make millions with my library and not seeing a single cent back... Even though it's opensource I know
 
That's understandable skiwi... but making money off a library is probably harder than you realize at first.
Making money off selling source code is hard.
 
And of every element in tree-like structure you can see the bounding box of the element and for the word you can see if it's numeric (according to Tesseract) and whether it is taken from the dictionary... For a symbol you can see the optional symbols with lesser confidence. Then for all elements you can also see the confidence, which is just the average of the symbol confidences
Also the situation most likely isn't that easy
I depend on some other opensource projects, which seem to all have very open licenses
And then there's Tesseract itself, on which I basically just wrap, so I'm not even sure if I should take its license into account then
 
The only thing that stops a customer from sharing the source code they bought from you to someone else is the license. Without someone with some good legal knowledge, the license could very easily be completely meaningless.
 
@skiwi I can't promise anything at this point in time, but I'm sure we'll work something out if I/we end up using what you're making.
 
12:46 PM
AND, even at that, in order to take action on someone violating the license, you first have to KNOW the license is being violated.
 
@nhgrif That's a very true point
 
@skiwi I'm jealous that your TCG on GitHub has 5 stars, 4 watching and one fork. I have one star (probably you) and one watcher (myself)
 
@SimonAndréForsberg I'm hoping to have the utility ready by Wednesday 5pm next week, still considering what I should exactly do with it then... Put it on github yet? But for it to be released as a true library I do want tests, javadoc and general documentation
I work currently on wednesday at work and I need this library for my own work ^^
 
@skiwi lol, of course you want :) Well, no matter what you choose, keep me updated.
 
My github project, which allows you to make an iOS app talk directly to MS SQL Server rather than going through a web service, only has 2 stars.
 
12:51 PM
@SimonAndréForsberg Pretty accurate
@SimonAndréForsberg You know what's best even? You can query the search results to find a number of 10-digits, and even if it recognized "516688o668", it will fix it to a number if the o has an alternative 0 recognized
 
You know, yesterday we were talking about how I thought programming courses in university should spend some time focusing on maintaining other people's code--not just writing code from scratch.
I think on top of that, there should be some time spent on asking good questions. Programming is a line of work in which you're definitely going to have bugs or problems with your code, and as such, you're definitely going to have to ask questions about your code, either to a colleague, SO, or Google.
4
 
@nhgrif Can't star that enough.
Same holds for line above
And I'm still on university even
But universities aren't to create programmers... At least not he Computer Science study I'm doing here
 
The thing is, people who are better at asking questions to colleagues, SO, and Google are also people who ask fewer questions, because some of the legwork you SHOULD be doing before you ask someone else to spend time on your problem will actually end up answering your question most of the time.
 
Unfortunately I don't see that a Bachelor College would be capable of producing (on it's own) a good programmer
There simply seems to be no room in the curriculum
 
@skiwi My college is supposed to create programmers ("Applied Informatics" is what I'm studying) but they're too busy giving business classes to get into that fun stuff
 
1:02 PM
@JeroenVannevel We're here too busy talking about theory
s/easy/busy
It's even actually the wrong study for me, but I've got to finish it either way
 
Well, I don't have a bachelor's degree. Only an associate's degree.
But I could take whatever courses I wanted for the last 2 semesters and I took nothing but programming courses. We didn't spend any time worrying about maintaining other people's code or learning how to properly debug or ask good questions.
And this is at a 2-year college that actually just started a mobile development degree program. So for that degree plan, the entire point is that when finished, you should know everything you need to know to develop apps for at least one of the mobile platforms.
 
I've got in total Programming, Programming Methods and Software Testing... First was an introduction course, then an advanced one and latter was about testing, unit testing, etc. Not much special either.
I also did take courses involving Android apps and OpenGL/JOGL/Java, but there was no other goal than make a functioning app and create a 3D visuzliation there
 
But if you're not taught how to maintain old code, this won't be the case. I don't know about Android, but every time iOS updates, there's a slew of deprecated methods, and a slew of new methods that never existed before.
 
I don't even know if an university can teach such general knowledge?
 
Why not?
Certainly a programming teacher should know how to program, correct?
It's not out of the question for the programming teacher to write a small application that mostly works but has some bugs or deprecated methods, or whatever, and distribute it to the students as a homework assignment.
With the assignment being to fix the problems.
As for teaching how to ask questions, I don't know...
 
1:14 PM
The former is true, we've even had that as assignments
But there's always a bunch fo people that cannot fix it, the goal is to teach it to those
 
But I know I've seen students ask the teacher a question about their code. The teacher asks to look at their code. The teacher spots the problem, shows the student how to fix the problem and explains what the problem was and why the fix worked.
 
And then you'll have the ones which can fix it after explanation, but then cannot apply that knowledge on a second set of exercises
 
But the student doesn't learn much from this.
Because what does the teacher do when he looks at the code to find the problem? He asks himself questions about the code. As he finds the answers to those smaller questions, he gets to the source of the problem.
The correct thing for the teacher to do should be to not look at the code as much as possible, and instead ask questions of the student. Forcing the student to answer these questions (or turn in broken code) forces the student to think about their problem.
By asking questions of the student, the teacher demonstrates to the student the types of questions the student should be asking of himself with future problems.
 
true
Where do you get the experience from by the way? Your experience with just-graduated students
I see parts of TrueCrypt also have an interesting license... It is allowed to look into the sourcecode, yet you are not allowed to modify or redistribute it.
 
1:32 PM
And how do they know I'm not doing that?
As far as my experience? I'm recently graduated. I finished my last semester in the fall. I worked part time at my company from October through December and have been working full time as an iOS developer for them since January.
 
@nhgrif I actually more meant your experiences with coworkers/students that cannot ask questions properly. Or was it more meant generally on SO?
 
It's sort of generally pointed as SO, but also at a lot of my fellow students.
 
@nhgrif In the case of TrueCrypt the goal would be to design a successor opensource library. Then other problems still include that the new authors could be unknown. And biggest issue is that authors of TrueCrypt want to stay anonymous and thus will never actually start a lawsuit
 
Including one fellow student who cycled through 5+ SO accounts in the course of a semester because he kept getting question banned.
 
That's just... awful
 
1:36 PM
He posted more questions to SO than he had programming assignments.
 
But they did help him I bet?
 
Depends on your definition of help.
He passed the class.
 
Giving the solutions rather than really helping him
You should post that example one day meta-discussions come up on SO about answering/commenting in bad questions
 
There was at least one question where he marked an answer as accepted and commented "Thanks! I don't understand this at all, but it works now!"
 
Did he even syntax?
 
1:37 PM
I don't have any of the links to these any more.
But I did make my professor aware of the situation. Not to get him in trouble, just because I know the student had at least a couple more semesters, and would have more classes with that professor, so hopefully the professor could make sure he was getting a fuller understanding.
Although what bothered me the most about this particularly student...
 
I wonder how bad my first SO questions were...
 
He was asking about the difference between + and - methods in Objective-C. So... this is static vs non-static methods in Java. It's a good question to ask and really talk about in class because it's important to understand.
But he asked the question (because he didn't understand) then didn't pay attention to the class discussion regarding the question at all.
And asked the exact same question the following week.
 
Just wow
 
Eventually, this will be someone's coworker.
And by the time he is someone's coworker, he still won't understand the difference between class and instance methods.
 
He's an example of the every bad programmer needs two good programmers to fix issues xkcd.
It seems that I'm only using StackOverflow for a year and one month and appereantly was already advanced enough to understand most concepts, so no stupid questions from me.
Always a good moment to accept answers after a year :P And appereantly I hadn't heard about upvoting yet back then
 
1:45 PM
I've only had my SO account for 8 months.
And I have 10.3k rep...
 
Cringes Why the hell do my java questions mostly have java in the title... I surely wasn't that stupid back then, or was I?
 
lol
 
Also imagine the horror of that guy who doesn't understand instance vs static when he needs to work with multithreaded code and may be full of ego to accept the task.
 
lol
Well, fortunately, even though I've only been at my company for a short time, I think that I'd have a lot of input if they ever decided to hire someone to work on the mobile projects with me.
And if they were interviewing him, I'd just flat out say no.
 
It's always cool if you have input
 
1:50 PM
Yeah. There are only 4 programmers at my company.
Three of them work on the desktop software. I work somewhat by myself on the app.
Sometimes I have to work on the desktop software (rarely)
 
That sounds familiar to my situation as someone who works once a week at a company
 
And I do work on the SQL server.
And I do work with others sometimes when we're developing a feature for the app that requires features to be added to the desktop software.
 
Three others are working on websites and database, java webservices, etc. I'm working on my own project involving making java server software
 
The lead programmer is really good. The other two... well, one of them works really hard, but has trouble with some of the really abstract ideas. The other just doesn't seem to put very much effort in.
So even though I don't have a ton of experience, when the lead programmer is trying to work out an algorithm, sometimes he'll talk it out with me.
 
that's nice
 
1:54 PM
We write ERP software. Our most recent problem, we want to implement shift times and days and let the system automatically let supervisors know if someone isn't clocked in when they're supposed to be here
Apparently, some factories have really, really, really weird shifts
Not just 5 days a week, but instead some pattern that might stretch over 3 weeks.
4 day shifts, 3 days off, 4 second shifts, 3 days off, 4 night shifts, 3 days off, etc.
 
That shouldn't be too hard, though way more challenging than regular shifts I assume
 
The problem isn't really calculating the days. I mean, if the user gives us the pattern and a start day/time, we can calculate it out to whenever.
The problem is storing this information in the database in a way that's efficient.
 
@nhgrif You should have seen my schedule when I was working in the social service about six years ago. They used 6 week schedules. Sometimes days, sometimes evenings, sometimes weekends.
 
In a way that makes sense, and in a way so that the times can quickly be retrieved.
Yeah, exactly. The example I gave is on the more tame end.
 
Awkward moment when I figure out a question I asked a year ago was answered by someone who's studying IT on my university, though I don't seem to know him.
@nhgrif That's going to be a challenge
 
1:59 PM
The point is, we need to develop the software to allow the user to enter ANY PATTERN of ANY LENGTH, defining working days, working times, defined LUNCH times or flexible lunch times, AND THEN store it all in the database in a way that doesn't take too much space and in a way that can be efficiently grabbed at any moment.
 
I understand most, though what are the queries you usually run against that database?
 
We haven't got to that part yet.
Wait, what do you mean?
The software we develop is ERP software. It keeps track of everything a business needs to run. Everything. Employees, contacts, inventory, time clock records, etc. etc. etc. ad naseum. This is just one aspect of it.
 
You storing the shifts in the database, you want to run queries against the database then using the shift data I suppose.
 
Yes.
 
I can't think of a concrete usecase right here right now
 
2:01 PM
First of all, we want an employee to be able to query the database to get his schedule.
That's simple enough.
Or a supervisor to grab the schedule for all his subordinates and print it or something.
These two are simple enough, but for this... we could just tell them to buy a calendar from the store and write it on paper.
What we need to do is look at a shift, when it starts
grab all the employees who are on the shift, then look at their time records
and if they're not clocked in, their supervisor is alerted
 
Which is still relatively easy, or does it get tricky there already?
 
The query should be easy
But the query would have to be run frequently
 
you have a specific shift, then you take all employees on that shift, and check if the employee's last check in is before that shift and has no successive checkouts after that checkin
Which are a pain...
 
Because outside of querying the database, there's no way of knowing when a shift is defined to start
So we need to query the table that defines shifts and find all the shifts that have a defined start time of right now (or within however much period of time since the last check)
 
So for efficiency you'd want all employees to store their alstCheckInTime, but have it NULL when they have checked out afterwards
 
2:06 PM
Figuring out whether or not an employee is clocked in is easy and it's something we already do regularly through out the app and the software.
And... the timeclock table for some of our clients has millions of rows... we're not changing how the timeclock table works...
 
I understand that in practice problems are always harder
@SimonAndréForsberg Look at something I found... stackoverflow.com/questions/15865648/…
 
No single part of this is hard by itself, really.
The hard part is the fact that the table will have to be queried periodically. I'd guess once per 15 minutes, at least.
To see if a new shift has begun in the 15 minutes since the last check.
Doing that alone is easy.
But doing that and then checking all employees tied to any shift it finds and alert supervisors when an employee isn't clocked in, and doing all of this every 15 minutes... without slowing down the database for all the other queries it might be trying to run from other uses trying to do other things with the software, this is where it gets tricky.
The performance concern is the greatest problem ehre really.
 
Every 15 minutes sounds ike something not to worry about, but I recon that it's different in your case
It's funny to see how my SO timeline exactly resambles on which I've worked on lately.
 
2:40 PM
:o Some migration to the backup center right now?
 
Alright, I've got a livefeed of people completing review tasks. Finally something potentially useful from these websockets
 
2:55 PM
0
Q: Is my code clean enough and standard when processing Ruby on Rails requests using User's time zone?

p.matsinopoulos I have an application in Ruby on Rails (3.2) and I want all the requests to take into account the currently logged in user's time zone. Also, I want to have a helper that will let me display date time fields using user's time zone. I follow the next approach: 1) Inside ApplicationController I...

 
@skiwi lol, wtf? Did you work on a TCG one year ago?
@JeroenVannevel Can you see who reviews what and their action? For example when I review something in the close queue, can you see if I choose "leave open" or "close", and on what question?
 
@SimonAndréForsberg Yes... A totally different attempt though ;)
 
@skiwi Did you forget that you had worked on that earlier?
Hi @Nobody
 
Monking @all (I really should remove this tab from my start window to avoid auto joining ^^)
 
@SimonAndréForsberg No, only who completed a task in what queue but not the exact result
 
3:01 PM
@SimonAndréForsberg Nope :) I considered it not mature enough
 
@JeroenVannevel I was asking because I think one could analyze the close queue history and detect when users disagree over questions, to detect grey areas of Code Review.
 
Monking @Nobody
 
@skiwi So now have you more or less shredded that code to pieces and started over?
 
Monking all!
 
Monking @rolfl
 
3:08 PM
@SimonAndréForsberg That would indeed be something interesting. It doesn't give enough information for that though
At most you can make a nice little graph to see what queues get the most activity
 
@SimonAndréForsberg Correct
 
@JeroenVannevel Trusted users have that information when checking the close queue history, so the information is available somewhere / to some people / somehow. Not sure what the best way is to retreive it though
@JeroenVannevel I started a SEDE query for it, but I don't think it contains information about who did it. (Maybe SEDE master/monkey @rolfl can determine that better?)
 
I should also figure out how to find all users which have a specific word in their biography
Note to self: Do not use circular dependencies.
 
3:31 PM
Has anyone ever used Annotation Processors?
 
@skiwi Like what?
 
0
Q: Fluent API of a Role based access control implementation

Bruno CostaI am trying to provide a fluent API for authorization based on roles. As you will see I separated my implementation in two related Interfaces the Session and the Query. The session provides all roles, permissions and user information, so one may query it later via the Query object. I also separ...

 
@SimonAndréForsberg The Java inbuilt ones... Though I managed to get them working with Java 6 rather than Java 8
private void test(final @NonNull Object parameter) {

}
Makes the javac output:
Note: Annotated parameter parameter
Note: Parent method test
 
No, those @NonNull things I have never used
 
With custom code :)
I know of Project Lombok, though I want to know hwo to do it on my own
 
3:37 PM
I've used plenty of annotation-checking with reflection though, especially for finding methods with an annotation and classes
 
but compile time is in some cases cooler
 
3:51 PM
yes, absolutely :)
 
Appereantly there's a thing called AspectJ Compile Time Weaving
 
00:00 - 16:0016:00 - 00:00

« first day (392 days earlier)      last day (3620 days later) »