« first day (1032 days earlier)      last day (3282 days later) » 

10:02
@DanPantry what's your take on the CSS comments in that article
@Quill I use CSS modules with SASS.
0
Q: Can this be written in a shorter way? Dynamic function call perhaps?

MonsterMMORPGBelow you'll find my switch case. My question is, for each function I am manually adding another case. Can this be somehow shortened? You see case names and function names are same. For example case Euclidean_Distance calls Euclidean_Distance function and all functions takes same parameter. C#...

Can your title be written in a shorter way?
Pertaining to the question perhaps?
Yes
Then again it's to do with C# and WPF so I wouldn't expect terseness
10:15
did I mention I hate JavaFX, because it makes proper DI a royal PITA?
"how do I get the controller injected by FXMLLoader on loading a .fxml file?"
answer:
"you don't"?
You have to manually instantiate the FXMLLoader and call getController on the instance that loaded your fxml file after loading it instead of calling the static convenience method
Ah yes.
a Service Locator.
10:17
instead of being able to call that getController on the UIElement...
What could possibly go wrong.
3
because for whatever damn reason you can bind Controllers to UIElements separately
IOW that method isn't even guaranteed to get you a reference to the controller you want in an FXML that has multiple controllers
because you can actually do that for whatever obscure reason..
or you can't...
you can only apply it to the root element
which gets funny when you start to include other fxml's ....
that's so incredibly stupid
the funniest part about that crap is the javadoc for getController()
> public <T> T getController()

> Sets the controller associated with the root object. The value passed to this method is used as the value of the fx:controller attribute. This method must be called prior to loading the document when using controller event handlers when an fx:controller attribute is not specified in the document.
</rant>
What the hell is a nim game
there's X items
you take turns, take off 1 to 3 per turn
whoever is forced to take the last loses
10:43
Oh, there was a video about that here posted a while ago.
Nim is an algebraic device of sorts.
Not a great video, but it explains it pretty thoroughly I think.
Perhaps code review would be better suited for your question. It's not clear to me the problem you are solving. Some sample tree diagrams would be useful, with the sequences and parallel parts explicitly labeled. I would be curious as to how you test this code. — Kenn Angell 38 secs ago
@Pimgd I'd say 5 isn't a lot for a tag. If we ever get more (say, 10+ or so), we'll re-tag them all without trouble.
15
Q: Game tag - When to create own tag for games?

Simon ForsbergI have just created the minesweeper tag and the rock-paper-scissors tag. The reasoning for this was: Rock Paper Scissors (Lizard Spock) is popular enough to deserve its own tag. (37 questions seem to be applicable for it) Minesweeper has seen some questions (posted by me) not directly related ...

@rolfl says:
> Any game which has at least 3 or so existing questions, and does not fall in to another sub-category of game, is a good candidate for a new tag.
He does.
Keep the fragmentation in mind. We don't need a tag for every game out there just because someone wrote one piece of code for it.
But I find the tag to accurately capture the problem though, and it helps with finding related improvements
10:51
Agreed. And it's definitely unique enough within the section.
So I won't blame you if you decide 5 is enough :-)
Now if only somebody would create a language called Nim to make matters worse...
yeah that sucks =/
Quit with the deficit mindset, @Mast
11:05
possible answer invalidation by MonsterMMORPG on question by MonsterMMORPG: codereview.stackexchange.com/posts/121541/revisions
@Duga dooooom
You should consider to ask this question on code review as you have no specific problem to ask about — empiric 8 secs ago
11:51
more copy-pasted code to clean up
it gets even worse because it was copy-pasta'd 5 times. and it doesn't work any of those 5 times
> Insanity: doing the same thing over and over again and expecting different results. ~ Einstein
2
Q: Custom DataContract Serializer

ivan_petrushenkopublic class InfoSerializer : IInfoSerializer { private static readonly ILogger _logger = LoggerFactory.Instance.GetCurrentClassLogger(); public string Serialize(BackgroundJobInfo info) { var stringBuilder = new StringBuilder(); using (var stringWriter = new StringWr...

0
Q: Switch case is been called multiple times

Akshay WattamwarI am facing problem, but I am not getting why switch case is been called multiple times. SO for this purpose I am uploading full file. In logcat this line is been shown multiple times 03-01 17:23:31.861 10958-11008/com.example.akki.assignment2 E/Surface: getSlotFromBufferLocked: unknown buff...

12:27
0
Q: Delayed output stream "manipulator"

Simon KraemerI was just playing around with some code and had the idea about writing some kind of ostream manipulator to delay the output of characters in a typewriter like style. The focus was mostly on how to use it and was inspired by std::fixed or std::setprecision. Overall it works pretty well. I just ...

12:48
ohg od
the copy pasted code has a huge bug in it
that has probably caused us to lose some data
oho dear
Greetings, Programs.
Is this not better placed on codereview? — Joe 12 secs ago
0
Q: Memory efficiency improvement for a board game simulating contest solution

ADGFrom http://codeforces.com/contest/625/problem/E Game: Frogs are placed on a cyclic gameboard, divided into m cells.Cells are numbered from 1 to m, but the board is cyclic, so cell number 1 goes right after the cell number m in the direction of movement. i-th frog during its turn can jump fo...

You can do it in O (n * log n). Some boffin on the code review or algorithms site might help you. Sadly I think a full answer is off topic. — Bathsheba 41 secs ago
monking @RubberDuck
13:00
@DanPantry That's why you don't copy pasta!
Monking
@RubberDuck Don't look at me.. I don't :(
But my colleague proudly admits to copy pasting stuff to create new files that are simialr to each other etc
3 hours ago, by Dan Pantry
I can hardly motivate myself to write code outside of work (despite the fact that I really want to)
I can so relate to this ^
Honestly, the stuff I do in work probably relates to that..
13:01
Wait... proudly?! WTF?
I asked him "how did you create this file" and he just asid "oh i copy pasted it from X Y Z file"
it's done literally all over the solution
But, it works, so it isn't a problem for the manager..
I'd blast him at the review.
What review? :D
3
We don't have code reviews :D
I mean, we do, we have a calendar event for them
every week
It's just that calendar event is "Cancelled: Code Review"
as has been for the past year or so.
:D.
Can you tell I am frustrated. :D
Dude.... no. Nothing goes to prod without a second set of eyes.
but it does
that's the reality of it, unfortunately
13:04
Even if that means grabbing someone at random and saying "HERE? LOOK AT THIS BUG FIX BEFORE I TEST IT IN PROD!"
There's some manual end user testing, but obviously humans are humans and we miss things.
And there's only two of us working on this project.. and I'm only the one really qualified in anything javascript
Then it sounds like it's either time to fix it, or look for a job.
I'm trying to fix it
It's just not so easy
Put yourself in my shoes :p
Give management a copy of the numerous studies showing how reviews reduce bug counts & therefore cost.
I'm a young, sometimes melodramatic or overdramatic, programmer (at least from my bosses perspective) who has a vested interest in making the Angular stuff more "complicated" for job security (because I';m the only Angular developer)
And the person who copy pastes is a veteran developer who has worked on other projects in the company and has been developing for at least a decade
When you put it that way you can see why it is hard to have much push
And even when something is agreed upon it comes with much hang wringing
13:08
Dust off that resume cuz. You can't fix irresponsible.
I've only been here a year, same as previous company. Wouldn't be wise looking for another job right now
My condolences mate. That's shitty.
I take it as a challenge
It is frustrating, though
Personally, either I work on quality code or on quality salary
6
Preferably both ^
13:16
if you star it enough it'll be the first hit on google for my name
2
The way I see it is yes it sucks
Zak
Zak
@DanPantry If you can prove that policies which allowed your colleague to produce crappy code and get it into prod led to loss of valuable data, maybe that'll be enough of a "bottom line" issue to get your manager to consider some changes.
But I could be working for a much shitter place with a shitter paycheck :)
@Zak The problem is that we are in the place where we agree, yes, changes need to be made.
Unfortunately it's actually making those changes that are the issue.
but it would be closer to home, maybe
Much like everyone agrees that climate change is an issue but gosh that oil does look super nice
Zak
Zak
13:17
So your manager agrees with the idea of changes but not with actually doing anything?
Resource is an issue
As I mentioned - there's only two of us working on this project and I'm really the only javascript-fluent one
Zak
Zak
what comes under resources?
time, money, some other metric?
Employees
Resource in this sense meaning how many work hours we have on a project
The idea is that it would be great to pay off some of that technical debt to save the company $100 per month in technical debt interest payment paid as manhours. The problem is that we're not making the interest payments in the first place.
A la how many employees are working on it
13:18
That sounds like your issue.
That's about right
Zak
Zak
Can you convince your manager that not catching bugs will cost more developer-time in the long run?
He knows that
Like I said, this is not some kind of thing that he isn't aware of and he needs to drink from teh foutnain of knowledge
So if you could put in ten hours of your spare time for free, we would really appreciate it. ~ Management.
Zak
Zak
Oh, so the problem is actually at some level above your manager?
13:20
So that's why in my spare time I've been trying to throw together a version of the product that's done "right". Should I do it? probably not. but i have nothing better to do, and who knows, maybe I might not wan to kill myself when reading the code..
@Zak well we just simply do not have the resource to apply all these fixes unless we put a code freeze on all features.
@DanPantry staph
Which, while in theory sounds great
We're still releasing to new countries
We have a one month hiatus of releasing after the 7th
At which point hopefully I can do some tidying up..
Zak
Zak
In that case, I'm out of feasible ideas for how you can fix your situation, sorry.
Ofc, it's a hard problem.
But I don't think leaving will fix the issue either
And I like who I work for - just not the methods - so I want to fix it.
I am very fiercely loyal to a company that treats me right :)
You should plan for half your time after release to be cleaning, half your time to be addressing the planning and implementation of strongly requested new features, and half your time to be fixing bugs.
13:22
@DanPantry great for learning if nothing else and learning is probably more important than a project
> badly requested new features,
kek :D
@JohanLarsson +1
I meant like "badly wanted"
but yeahhhh
I can haz featur pls
@Pimgd No, you're right. I had a feature request earlier with two photos. One of the old software one of the new software (which I am working on) with literally zero other explanation
Zak
Zak
Just an idea, if you're going to spend significant amounts of your own time working on stuff for the company, go talk to your manager and negotiate some compensation (in some form your manager can get approval for, even if it is just official acknowledgement of your extra-curricular effort) for what you want to do.
@Zak Ah, I don't want to do that
You see, if I did that it would make the extra curricular project "official"
13:24
I can be compensated pretty well with pizza.
3
The manager would expect some kind of output from it.
I make no guaranetees I will actually finish the project and I don't want to be under pressure to finish it
Zak
Zak
Recognition can be a valuable commodity
They already know I work on stuff outside of work hours occasionally and don't log hours for it. Their response is "you should code less"
The company would save me from walking all the way to the store, and spending 45 mins obtaining and eating food when I can eat whole pizza in 20 minutes. Plus I'd be happier and thus more productive.
@DanPantry or that TDD is a good idea. Everyone knows it, but nobody does it... The struggle is real.
13:25
@Pimgd You're great. LOL
I should write this all down and present it to my boss.
@RubberDuck Exactly
Even I know TDD is a great idea, but given time constraints I simply cannot implement it at the moment because all teh code is not written to use TDD
With the great header "Why you should give me pizza", just to set the mood
Zak
Zak
@Pimgd This would be why all the really successful tech companies provide *everything* they feasibly can on-site.
Why you should give me pizza:
1. Pizza is great
2. I'm pretty great
3. My productiveness is inversely proportional for my desire for pizza.
4. It's pizza. Come on. Why would you not get me pizza? I'll give you a slice. Maybe.
3
13:26
We jest but somethings, by virtue of being there, are no longer needed
@DanPantry you need Micheal Feather's book.
@RubberDuck link for bookmarks?
LOL
it's funny
Because yes, that book would be applicable here
Despite the fact that most of this code didn't exist 6-8 months ago.
I need another version of that book
13:28
0
Q: hackerrank test not pass Project Euler #14: Longest Collatz sequence

Diego de Limai was just trying this problem but its not pass and i a little confused why, someone can give me a tip def collatz_length(n, cache): if n in cache: return cache[n] length = 1 + collatz_length( (n//2) if n%2==0 else (3*n+1) , cache) cache[n] = length return length def get_longest_collatz(base):...

Working effectively with legacy people
4
Though I suppose in today's world 6-8months is long enough to make something legacy code.
hmmmh although actually come to think of it
old people are usually pretty good
If you want a code review, please post on codereview.stackexchange.com. — deceze 56 secs ago
I can crack as many jokes about their age as I want
but they'll whoop my ass in a review
13:29
6-8 minutes is long enough to be legacy code if there isn't a test.
4
Isn't commit a synonym for "convert to legacy"
4
push is
2
commit is "I might be done with this. Maybe. Lol, rebase"
JK, we use changesets because Team Fail Server
and then I ran out of jokes for some reason
this is good
now I am free and can go back to work for once
See you guys in 5 minutes
@DanPantry LOL REBASE FORCE PUSH
4
@RubberDuck +1
13:38
0
Q: Implement Stack Using Array

Muhammad Umar Tariqi have designed a Stack using array in C++ i don't understand 2 things 1.) The Stack is of fixed size that i am setting in #define MAXSIZE 10 and when i push and pop it is working .. but when i pop shouldn't it also remove that element from the stack ? why is it that in the algorithms in m...

Alright, we're getting somewhere
I've centrallised where teh data is pulled from and it is pulled when the current view is changed, rather than in 5-6 different places
Improvement.
0
Q: Utility method to create custom popup in jquery-mobile

Tino M Thomasfunction(content,redirectUrl,customButtons, headerMsg){ var $popUp = $("<div/>").popup({ theme:"a", dismissible: false, overlayTheme: "b", transition: "pop" }).on("popupafterclose", function (){ //remove the popup when closing $(this).remove...

@Pimgd what counts as old?
@Phrancis If you are deciding between my two answers to mark as accepted, I'd opt for the TDD answer if it were up to me. ;)
13:48
s/TTD/TDD?
(monking!)
Train Travel Development
6
Zak
Zak
Note to self: Whilst worksheets have *particularly* large computational overhead, the same is true when accessing the contents of any object.
@Mast aka commuting
^^
13:49
@nhgrif It's definitely the one that got me thinking about the code more (and differently). I've been writing a whole bunch of new tests, I'll show you once I'm done... github.com/Phrancis/JavaExercises/blob/master/src/Chapter5/…
@nhgrif Anyone who seems old to me, which tends to be somewhere between 35 and 40 and up
I wrote unit tests for a queue about a month ago. ;)
Copyright by redacted
that's not a valid copyright or is it
I just changed the text there for the screenshot.
And I've already changed it back...
well nevermind then
13:53
So right, it's probably not a valid copy right as pictured, but there's no content below it to be copyrighted either
Copyright is a weird thing anyway.
4
@nhgrif unrelated question, do you know of an iOS app that I could use to write some basic code? Don't really care what language, just want something that I can play with if I'm just sitting around or whatever
@Phrancis If you like Python, this is pretty good: omz-software.com/pythonista
@Phrancis I don't think so.
Like, best case scenario, you could maybe make one that'd run JavaScript
@EthanBierlein That looks pretty cool, might try it out
@nhgrif I saw a few for JS but the reviews were bad
14:05
@Phrancis lol
the facebook app is written in javascript
on iOS
I mean, they have some compiled assets for Swift
But the majority of the codebase is written in JSX
var { TabBarIOS, NavigatorIOS } = React;

var App = React.createClass({
  render: function() {
    return (
      <TabBarIOS>
        <TabBarIOS.Item title="React Native" selected={true}>
          <NavigatorIOS initialRoute={{ title: 'React Native' }} />
        </TabBarIOS.Item>
      </TabBarIOS>
    );
  },
});
Example from linked page
That uses iOS native components.
Oh yeah, javascript is everywhere.
Though that is far from basic. Just pointing out that iOS javascript apps aren't crap just because javascript. Apps that are crap aren't crap because of the language they are written in, they're just crap
You can write crap in every and any language.
3
console.log('crap')
can confirm.
Yup. I'm just impressed that they were able to pull something off like that.
14:08
React-native is honestly a really, really impressive solution.
Angular 2 is meant to be supporting that sort of thing through phonegap or cordova.
@Mast But can you write non-crap in all languages?
except lolcode
well... You never know...
14:09
Even in LOLCODE and Brainfuck, yes.
what about the donald trump language?
VISIBLE "crap"
Well you can write non-crap LOLCODE, you just can't do much with it
Hello @MoonLight
Well you can write non-crap LOLCODE, you just can't do much with it
@DanPantry What's that, a lousy dialect of ?
14:11
@Mast Close, it's a lousy dialect of
> No floating point numbers, only integers. America never does anything halfway.
All numbers must be strictly greater than 1 million. The small stuff is inconsequential to us.
There are no import statements allowed. All code has to be home-grown and American made.
5
> In its raw form, TrumpScript is not compatible with Windows, because Trump isn't the type of guy to believe in PC
6
> Won't run in root mode because America doesn't need your help being great. Trump is all we need.
You hav to admire the level of thought that went into this elaborate troll.
> If the running computer is from China or Mexico, TrumpScript will not compile. We don't want them stealing our American technological secrets.
lol
Well, it's better than the average political advert they blast on the American TV nowadays.
looks like this was removed, was funny.
14:13
I wonder whether they implemented a Firewall in TrumpScript yet.
> But most importantly, Trump doesn't like to talk about his failures. So a lot of the time your code will fail, and it will do so silently.
4
That's pretty much the best reason I've heard for failing silent so far.
Zak
Zak
This was a particularly impressive piece of trolling:
89
Q: Can't find clit

j0hI have some lit files I want to convert from mircrosoft reader files to something my other devices can read. My friend says I should have clit, in $ which clit /usr/bin/clit but I cannot find it. I tried locate clit but the results are unrelated. So then I tried sudo apt-get install clit but ...

3
@Zak I have a runny nose and I just snorted because of that title... that's one way to clear my sinuses
I'm just sat here giggling like a little school girl, hahaha
@Zak "nuoh my god"
@(*&^%#(^#%(*^#$@&^%$ OUTLOOK >:||||
6
I'm not sure how that question doesn't have more than one downvote.
14:19
> It looks like you're trying to destroy Outlook. Would you like to write a complaint in Microsoft Word? - Clippy
3
wow wall of stars here
you can see scores on AU @EthanBierlein?
> Microsoft Word stopped responding. Do you want to troubleshoot?
2
@Vogel612 No, I have the vote count userscript @Quill wrote.
@enderland We like starring things.
14:20
@Mast it's funny how rooms have different cultures about that
obligatory
> Waiting for Microsoft Word to be stopped. ~panel freezes
0
Q: Accordion navigation in Vanilla JavaScript

st88For an intranet site with large description-texts I made these website with an accordion navigation. // Get all span-"buttons". var buttons = document.querySelectorAll('.sign'); buttons = Array.prototype.slice.call(buttons); // Toggles the visibility of the text-paragraphs. function toggl...

0
Q: Simple Snake Game OCaml

RUser4512I wrote the following two players snake game in OCaml. It is working fine (I did not pay much efforts to the graphical appearance though). As a beginner in OCaml, I would be happy to have some review. #use "draw.ml";; #use "player.ml";; #use "threading_tools.ml";; #use "game_settings.ml" #load...

@Mast "Microsoft Word has stopped responding. Searching for a way to fix the problem" (the biggest lie in computing ever)
Yea, just like everything on SE though. Voting patterns, what's considered a good question and what not, stars in the chat, activity in general, how often the queue is cleared, etc.
14:21
IMO 2nd monitor has the best culture on SE though. Totally not biased...
3
> Microsoft Word will be fixed in 10 seconds... 25 seconds... 55 seconds... 3 minutes...
> Was this helpful?
^lol I never have felt inclined to click "Yes"
So Phrancis, I see you're trying to open 45k e-mails in Outlook. You should totally drop that and use jQuery instead.
3
@Phrancis I did, once... and then they brought up a form and that's when I closed the tab. Or wait, was that after clicking "No"...
> What can we do to improve this website?
I seriously answered they were too incompetent to even try, once... I was angry.
14:30
@DanPantry TS!
I have had the "is this helpful" popup blocking the content I was trying to read
Might be better posted over on code review. codereview.stackexchange.comtymeJV 24 secs ago
Ah, yea, not helpful.
14:48
alright, interview with London finished. Later this week I've got a second interview with a senior dev of theirs, then a practical test and afterwards potentially a real life meeting
Also positive: I talked about a £35000-£40000 salary and that was no problem
I'm going to be a kingpin in London
London has fallen
They work with the perfect stack for me: careers.stackoverflow.com/jobs/107332/…
If both Berlin and London offer me a job, it's going to be tough
Don't go to London.
The rent there will be half your salary.
... I did minor (I googled) research on that last year
basically tube strikes
and the people were complaining about rent
so how much would it cost to live outside of london but close to work
He's Belgian, he's used to people going on strike.
14:52
@Mast I'm probably going to look into sharing an apartment so it's not THAT bad
and I think I found places 45 mins away from the center of london for 600-700 pounds/month
lol, our railways strike every month at the worst moments
That doesn't quite bother me
0
Q: Request to perform security check on angularjs code

RvdMTwo weeks ago i've started writing some javascript and angularjs code for a customer. As a proud newby I must also be aware of the dangers on the big bad internet. In particular vulnerabilities such as XSS attacks. I've already performed a vulnerability scan and this showed I didn't restrict ses...

0
Q: Outputting all reasons for rejection in Python

LilfinnThis is a basic question but I would like some help on this. I am trying to write a program that checks the dimension of an object and either accepts or rejects it. The issue is that I need to output all the reasons for rejection and this is where I am having trouble. Here is my code: def calcul...

Anyone know a bit about XSD files (in .NET/C# context)?
14:58
because silence is a poor substitute: no

« first day (1032 days earlier)      last day (3282 days later) »