« first day (1136 days earlier)      last day (2868 days later) » 

12:00 AM
RELOAD! There are 2431 unanswered questions (93.0370% answered)
 
12:27 AM
0
Q: Implementing atoi in c

PhutiI was given a school assignment to implement atoi, please review my code. int my_atoi(char *ato) { int res; int sign; res = 0; sign = 1; while (*ato == ' ' || *ato == '\t' || *ato == '\n' || *ato == '\f' || *ato == '\r') ato++; if (*ato == '-') sign = -1;...

 
12:42 AM
No one's here..probably off in prep for GoT.
 
I'm here and I do not watch GoT!
 
@Legato I don't watch GoT burn
 
12:58 AM
0
Q: Sort Facebook Messenger Contacts by Idle Time

Patrick RobertsI wrote a UserScript that auto-sorts contacts by offline time using the MutationObserver API. I tried to make it as DRY as I could think, and I also tried to make my code as straight-forward as possible, commenting thoroughly. Please let me know any improvements I can make. // ==UserScript== // ...

 
 
2 hours later…
2:32 AM
0
Q: Ruby beginner: class, instance variable, accessor, rspec

iswgSo I'm in the process of trying to recreate a board game called Ciao Ciao. I'm not anywhere near done but I keep getting stuck and would really appreciate some help. So far I've made the following 3 classes and rspec file: The Player class require_relative 'die' class Player attr_reader :name ...

 
3:02 AM
@Legato I don't watch GoT either. Just doing dishes.
 
it's sunday night, there's probably better things to do than write code and be friendly on the internet <_<
 
Like dishes.
And MS Solitaire.
And reading.
And doing 10-second bug fixes on RD so they won't bother me in the morning.
 
3:38 AM
0
Q: Trying to port my Graph/Node/Edge code from Java to C++

hftI'm fairly familiar with Java, but I want to start working more with c++. As a exercise I decided to try and re-write in c++ some Graph manipulation code that I have in Java. I've been able to port more simple stuff, like code for linked lists, etc. But for some reason I'm getting errors that I h...

 
3:49 AM
 
4:15 AM
 
0
Q: Understanding Strings Amateur level

John SmithI've recently started Learn Python the Hard Way and I'm trying to understand strings and the use of %r, %s, etc... Can you first explain the differences in analogies to the real world? And second I was playing around with code in order to better understand what they do and so I created this. for...

 
It's a bit hard to know where to start (and this looks more like a CodeReview question) but: wouldn't an AirConditionInterface-class make a lot more sense? — T. Benjamin Larsen 29 secs ago
 
4:46 AM
Monking
 
5:05 AM
monking @Heslacher
 
5:57 AM
@Legato I was sleeping. I wish i was prepping for GoT, but I live in Not-America, so I have to wait until later to watch it..
Also it goes without saying but NO GOT SPOILERS PLEASE
 
6:31 AM
    var fileName = new string(file.Headers.ContentDisposition.FileName
        .Where(character => !invalidFileNameCharacters.Contains(character))
        .ToArray());
ouch, that hurt. Please tell me there's an easier way to do this @JeroenVannevel?
 
@EBrown <3
var fileName = file.Headers.ContentDisposition.FileName.Trim(Path.GetInvalidFileNameChars());
Much better
 
Yep.
#AlcoholWinsAgain
2
 
lol
 
"Elliott, are you drunk?" "Not at all." "How many fingers am I holding up?" "Which one of you is asking?"
5
 
6:34 AM
just go easy on the alcohol alright? :P
 
"You're drunk ... I bet you're seeing double!" "It's alright, I have two guns, one for each of you."
 
> I have two guns
*flexes biceps*
 
No, they were real guns.
Watch Tombstone.
You'll see.
Doc Holliday is the best.
 
lol, now I feel uncultured
Probably because I am
 
Swine.
 
6:36 AM
-1
Q: Get Possible sets of any given string

Maqsood HakroI want to get result like this. Example: String text ="a"; String []result={"a"}; String text ="a b"; String []result={"a","b","a b"}; String text = "a b c"; String []result={"a","b","c","a b","b c","a b c"}; String text = "a b c d"; String []result={"a","b","c","d","a b","b c","c d","a b c"...

 
@CaptainObvious no code no glory
 
@Heslacher didn't even specify the language...
 
mornin' ^_^
 
Morning
 
6:49 AM
what's the best way to start your monday morning if you want to get rid off the feeling of killing a co-worker who wrote shity code ? :)))
 
@Dex'ter Reviewing the code, working out what is wrong with it, and either summarising it in an e-mail
Or fixing it with annotations
 
@Dex'ter Alcohol.
 
or invite your colleague to take part in a code review session.
 
@EBrown haha
 
Be constructive about your feedback.
 
6:50 AM
Wait, how shitty?
 
Write even worse code for them to deal with at some later point in time?
 
Or complain in 2nd monitor, like I do.
 
On a scale of 1 to Windows ME, how crappy was it?
 
@overactor Don't do that. That's incredibly unprofessional.
@EBrown I'd argue Vista was worse than ME
 
hahaha on that scale I'd say ... well..a lot above
 
6:51 AM
@DanPantry I never used Vista.
 
I would invite the coworker to a code review session and explain, in your view, what was wrong.
 
@DanPantry I'd argue Alcohol is not much better
 
@DanPantry
 
@overactor I didn't suggest it ^^
 
he quit
:))
 
6:51 AM
Then there's nothing to do other than fix it
Regulars of this chat room will echo that I work with an apathetic coworker and regularly have to clean up his mess
 
well, I know...but I still wanna kill it
there are just 8k lines but still
 
I don't think anyone was seriously suggesting alcohol or passive aggressiveness
 
Try not to fix all 8k lines at once... :p
 
...
I don't think this is wven possible
 
It definitely is
You can deconstruct every bit of code into logical pieces
 
6:53 AM
@Dex'ter One method at a time.
 
@EBrown What if it's all one method?
 
@overactor Break it up.
 
Then start by identifying bits and pieces and slpitting them out into multiple.
You don't have to get it right, just splitting the methods up would be a good start.
I'd recommend reading Clean Code.
 
@DanPantry thanks for advices. I know how to handle this but I still wanna "kill" him ^_^
 
@Dex'ter I believe murder is illegal regardless of how poor the code is.
Though, that would make an interesting court argument.
 
6:55 AM
Also, bear in mind you've only been in your company for a little [0] while... :P As someone who was in your position not so long ago, even if it's annoying, try to not say stuff like that. Everyone writes crap code, that's why we are on CR.

[0]: https://workplace.stackexchange.com/questions/59401/should-i-worry-if-im-the-youngest-person-in-my-compan.
 
haha, yea' right. Gonna search for some alcohool
 
> "But he wrote crap code!" "Yeah, but you can't kill him for that." "Why not?"
 
> "But he wrote crap code!" "Yeah, but you can't kill him for that." "He used a goto." "Not guilty it is."
2
 
Nah, goto isn't murder worthy.
 
@Dex'ter I know you're joking, but note that if you're going to look for alcohol every time you see crap code you may just get liver disease haha
 
6:59 AM
He straight eval'd arbitrary user submitted code on other users' machines?
 
@overactor Could be worse
could have evaled arbitrary code on a server.
That would be bad
 
@DanPantry on a server which contains plain text passwords?
 
@overactor a thing of nightmares
 
Speaking of crappy code
A guy I go to school with, wrote a big switch statement as part of a project he's doing for school.
 
Meh I tend to be more lenient on people in school because they don't really need to know better
 
7:01 AM
Naturally, we asked what sort of use case he had that would make that a viable option
 
hahaha :)))
 
What lang is this in? for context
 
Yeah, me too, programming is not his main gig by the way
still kind of amusing
 
Ill just patch my liver after that @DanPantry
 
Java
 
7:02 AM
In most languages the only alternative to a switch is some kind of Dictionary data structure, an equally large if statement or a large polymorphic structure (i.e, strategy pattern)
@overactor Ah, okay. He could have used the strategy pattern then
 
now, he's doing a board game and his problem is, he wants to be able to get x and y positions for each tile
so he did this:
switch (tile) {
    case 0:
        ...
    case 1:
        ...
    ...
    case 59:
        ...
}
yup, case 0 through 59, all containing a single return statement
 
ouch
But if you don't know you don't know
We have web layer implementation details leaking into our service layer
 
@overactor in c++ Id just do something like: stackoverflow.com/a/14828150/6165050
 
It was only yesterday I refactored that out
Sometimes people don't see the issue with these sorts of things, as long as it works, it's not their job to maintain it... (at least , I think that's how they rationalise it)
 
When I told him he could have just used a list, he said what he has now works for him
but as I said, programming is not his main focus
so eh
 
7:06 AM
@Dex'ter in C++ I'd use a strategy pattern, but in languages like JavaScript and Ruby ths is the approach I'd take too
 
Zak
Monking @all
 
well yea' you're right :)
 
Mind you, I've seen some very successful C++ projects using a structure like that
I don't think it was a std::map but it was something similar
 
Well, that' s why I recommended it :)
 
Hell, I remember writing something like that. I can't remember what it was now :(
it looked like this
{ OpCodes.SOME_OP_CODE, &fnc }
BindingMap< EventKey<Hooks::ServerEvents> >*     ServerEventBindings;
 
7:09 AM
I feel like Java devs are sometimes a bit too fond of patterns
 
So it was a custom type :-) Now I remember
 
So your program foo would be callable as foo add <user>, foo delete <user>, foo add <group> and foo delete <group> or something like that? Then you would have 4 Command objects. I don't see how you would be able to generically treat all commands at all. You have to have a few different cases in which you execute different code. For example: fetching information about the user and group are two different operations. In short: I don't think the design you're thinking of would help. Maybe you could post the your code on CodeReview-Stackexchange... — Lukas Kalbertodt 54 secs ago
 
@overactor Meh, they exist for a reason
 
Zak
@DanPantry Now that's the kind of border control I can get behind ^^
 
@DanPantry obviously, but there is such a thing as over designing
 
7:14 AM
Hahah @Zak
 
Zak
@DanPantry A points based system for weather imigration. + for being sunny, - for being too humid, automatic refusal for rain, terrorist watchlist for "importing weapons of mass destruction" AKA Lightning.
 
@Zak whoa there Nigel Farage
 
7:36 AM
@skiwi Rust jokes all around nowadays:
So, you're saying he should write his code in Rust? — Mehrdad yesterday
 
> Is it possible to run a motherboard in distilled water?
 
haha, I saw this question
 
Zak
@DanPantry +1 for Nathan Fillion
 
the first question that crossed my mind was: "why'd you do that"
 
7:44 AM
@DanPantry Is that from Firefly?
@DanPantry It's a great way to destroy your mobo.
 
@Mast At risk of setting off a lynch mob, I've never seen Firefly.
 
In your defence, it didn't last very long.
 
I remember being with an American girl and she was visibly shocked when I said I hadn't seen Firefly
 
Zak
@Mast Castle
@DanPantry At this point, it might be better if you never do. I *loved* firefly, but there's just enough of it to get you hooked, and then you realise that they're never making any more of it, and it's not fun.
 
@Zak True.
Monking @Vogel612
 
7:53 AM
Monking
Did I miss something this weekend?
 
Zak
@Vogel612 Football, torrential downpours in the UK, yet another mass shooting in America. Nothing out of the ordinary.
 
I did get a glimpse of football.
Downpourings I know from Germany, those are gone for a few days
mass shootings .... yea nothing out of the ordinary :D
 
0
Q: Cyclic primes below 10^1025

N3buchadnezzarProject Euler: 35 is stated in the following way Circular primes Problem 35 The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71...

 
Zak
Also, my new favourite festival name, Drownload:
4
 
That looks just like Rock am Ring
 
7:59 AM
@Zak Hopefully that's not the way GoT goes
@Zak Didn't have much of any rain in Wales
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Mouseover effects for social network icons
 
@Vogel612 Last day was cancelled I heard?
 
yeap. since the camping site was flooded and there was more rain to come
 
Many festivals were pestered by bad weather.
 
interestingly when you google "unwetter rock am ring 2016" you basically get pictures of tenacious d and nothing else
It was better than this carp though:
 
8:02 AM
> It is not terribly quick, but uses that all cyclic primes above a million are repunit primes with a prime number of digits.
 
repunit, perhaps this should've been repeated?
 
@Vogel612 ah yes, a Water Truck in it's natural habitat.
 
@Vogel612 That's way worse than what we had.
 
*David Attenborough voice* and here we see a water truck in its natural habitat, the freeway. If you listen closely, you can hear its horn, which is its mating call.
3
 
8:04 AM
that was 10th of July in Bavaria
 
Could have been worse. It could have been a sunken battleship.
As someone who has played a lot of Battleship, sunken battleships are the worst.
3
            var response = Request.CreateResponse();
            response.StatusCode = HttpStatusCode.OK;
            response.Content = new StreamContent(file.Content);
            response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
            {
                FileName = file.FileName
            };

            return ResponseMessage(response);
why is returning a file in Web api so verbose
 
Heck, all of the servers I've ever written look worse.
 
Zak
8:20 AM
America: Where you can put suspected terrorists on a no-fly list but you're not allowed to stop them buying an assault rifle.
 
So apparently there's a new TLD called .netflix
 
@DanPantry Why would anyone want a domain with a .netflix extension?
 
@Mast I can see it being pretty handy if you're, say, Netflix
 
8:36 AM
@LukasKalbertodt: CodeReview is for working code (ie, code that compiles, runs and gives the expected result). — Matthieu M. 59 secs ago
 
why would you need multiple domains for .netflix
 
@Quill ¯\_(ツ)_/¯
 
0
Q: c++ Reducing code duplication between listener callback functions

pokosoI wrote codes that listener and callback function like this struct MyListener { virtual void callback1(int value) = 0; virtual void callback2(string value) = 0; ... }; .. vector<weak_ptr<MyListener>> _listeners; void MyClass::fireCallback1(int value) { vector<weak_ptr<MyListener

 
Are there any certifications a software engineer should have ?
 
try to be smart and get things done
 
8:52 AM
Quill, I'm aking because my project manager pushes me to find such certifications. I'm part of an environment where certificates of employees matters in projects auction
 
0
Q: How can I make this algorithm to find possible strings run (a lot) faster?

ToadfishI'm attempting a programming challenge type task in C#, where the goal is to determine how many unique strings can be obtained by removing two characters. The prompt for the task implied that I should create the set of all possible strings with 2 chars removed, then return the number of items in ...

 
He's right, though..
What you asked is very open ended
 
@Quill new pic?
 
You may be interested in getting certifications for a technology you want to work in
 
@ardaozkal yeah, and you're back to gravatar?
 
8:54 AM
but if you aren't qualified to work in that technology without a certification you probably wouldn't want to be on a project for it anyway
 
@Dex'ter Depends on what sector you're in.
If you're in security, yes, you'll want a couple of certifications eventually.
 
@Quill due to someone (ban-evading spammer) contacting me on non-SE platforms I removed all PII for some while.
 
@Dex'ter you could go for Microsoft qualifications if you're in MS stacks, or CISCO certs if you want networking or network security
@ardaozkal ouch, sorry buddy
 
Mast / Quill I was talking more about some programming certifications. I already completed CCNA / CCNP from Cisco
I pretty confident that those are enough
but when it comes to programming, no certificate comes to my mind
 
What language doy ou work in?
Nearly all languages will have certifications by proponents of that language.
For example, Oracle have a certification for Java
 
8:59 AM
Mainly Python but I also do C / C++ / Perl / JS
 
I can't say I've heard of anyone having a certification in any of those languages
 
yeah, same
 
There's no centrallised board for JS, so that one is immediately off the cards unless someone like Mozilla start offering it (which would be very weird)
 
well, me nether...as a programmer why'd you need a certification ?
....
 
You don't need certifications.
But a certification is a piece of paper that proves you've got some credentials.
FWIW, I don't have any
Employers are far more likely to be more interested in what you can show you've done instead of what piece of paper you have
 
9:01 AM
credentials are pretty lame, most decent jobs don't ask for them
 
And if they aren't then they are not someone you want to work for anyway
 
@Quill I'm not asking for this because want it but because it's been asked from my project manager to research on this topic
^_^
 
does he want you to research certifications or the language for those certifications
 
yea'
 
I would find it very strange that a PM cares about your certification
Training courses, sure, but not certifications
 
9:03 AM
well, he cares about getting as much projects as possible. And for this, he has to have some dunno...something to prove hist employees are qualified ?
 
No, he doesn't need to do that at all
 
@DanPantry There are plenty of certifications for C/C++/Python, but none of those are internationally recognized AFAIK.
 
The business is not going to care about his employees
 
well, actually that's what he said to me
 
Unless the employees don't deliver
 
Zak
9:04 AM
@Dex'ter If you're in the US, there's a "Professional Engineer" Cert. which you need for (most) government (of any level) contracts.
 
Then you work in an atypical workplace, at least in my experience
 
@DanPantry Different cultures do different things do.
 
@Zak thanks for the tip. Im from Europe
 
In my experience, project managers only get questioned about their employee's competence when there is reason to believe they aren't, well, competent. I've been on both sides of this as in my first job I got reprimanded because I was a douchebag
But, as @mast says, maybe it's a different culture
 
Zak
@DanPantry Were you actually a douchebag? Genuinely curious.
 
9:06 AM
@DanPantry haha. How did you know this ?
 
story time
 
@Quill No worries, he wasn't that crazy (at least didn't attack me verbally or try to frame me- his reason of ban was... an unreasonable meta post connecting multiple chat servers to politics and he kept supporting that) everything was solved and after my report, his github got removed.
Had people framing me on 4chan before. Would get ~30 friend requests of people asking for game codes every hour on steam. I supposedly posted on /v/ and said that I buy first 3 to add me the game they want.
 
So in my previous position my boss and I didn't really see eye to eye. I was hired as a junior but was not given access to any learning resources, which I didn't really like, nor was I given spare time to experiment and was talked down to. So I procrastinated a lot, didn't really get anything done, basically showed my boss up.
 
@ardaozkal woah
 
I don't think that makes me a douchebag, it was just that I wasn't really happy with the situation I was in, + my boss not letting me take sick leave / annual leave, so I left after realising I didn't have a future there
 
9:07 AM
@DanPantry hey that sounds familiar
 
I joined my current place and with some initial teething issues (due to my age) I'm now a very respected employee and people value my professional opinion
and I'm given the freedom to do whatever I want as long as the work gets done
 
I've always been the youngest in every company I worked for
I'm still the youngest
 
I was the youngest, but a new hire a few months took that title from me.
I have a crush on that new hire as well, oopsie
 
:)) haha
 
¯\_(ツ)_/¯
 
9:09 AM
@DanPantry lol as long as you aren't the boss ;)
 
maybe someone had a crush on you also, but you didn't notive
notice*
 
Still a better love story than Twilight.
 
Possibly, I don't think too much about that at work.
 
who does ?
 
I'm still the youngest at work... in fact I'm the only minor <_<
 
9:09 AM
s/model/meme
@Dex'ter You'd be surprised :-)
 
@Quill how old are you, if thats not to inappropriate to ask
 
@DanPantry If your boss doesn't like you and you don't like your boss, get a new job.
 
@Dex'ter it's okay, I have it in my profile anyway: 17 <_<
 
I think Quill and Ethan are the youngest regulars.
 
well, you're younger than me..that's for sure
 
9:12 AM
Stargazer and monkey could well be the oldest.
 
what does "the oldest" mean ? ^_^ just out of curiosity
 
Age.
 
well yes, but I meant: 35 years old or so
or maybe 50
 
If you want to improve working code you should post it on Code Review. — Gerald Schneider 25 secs ago
 
< never worked yet. It is really hard to find a job in Information Technologies area in Turkey, especially if you are a minor. Even some of my friends who graduated from notable universities with high grades with long CVs spent months trying to find a job.
 
9:26 AM
@Mast, please do not comment on things you do not know about :p
 
well, why don't they try some freelancing ?
 
Might do that, thanks for reminding.
I have 2 job invites waiting for me to graduate tho :) One is a Translation job, I kinda have a past of translation from English to Turkish or other way around. Other one is infosec in a bank-ish thing.
 
well, go for the last one.
 
yeah. both are waiting for me to graduate from uni tho
 
if you won't be able to get your head around this you can always try some relocation
to do what you like
 
9:30 AM
yeah, good idea.
 
This question might be better over at codereview. — Craig Young 32 secs ago
 
To be honest I also want to study abroad. Working abroad for a few years to get uni money might not be a bad idea- I can part-time while studying too.
 
          var start = new Date();

          start.setMinutes(0);
          start.setHours(start.getHours() + 1);

          var end = new Date();
          end.setHours(start.getHours());
 
@ardaozkal go for it. I also had the opportunity to study aboard and I missed it because of sfinancial issues. And now I kinda regret it. When talking about money, you have to bear with the idea that this is not so important. Once you do what you like, and have some sort of satisfaction, you'll get paid for it
 
0
Q: Bubble Sort in Objective-C

Kasun RandikaFollowing is Objective-C method implementation I did for one of the most simplest sorting algorithms, Bubble Sort to sort an array of integers. Note:- I have defined it as a static method in the SimpleAlgorithms class. + (NSArray *) bubbleSort:(NSArray *) arrayToBeSorted { NSMutableArray *m...

 
9:45 AM
@Phrancis @Mat'sMug I'm doing some manual translations because the translation service doesn't move their asses. I have a badge that says "selling fast!" -- how do I translate this to French? Vente rapide!?
Same for @Vogel612. Verkauft schnell!?
oh nvm, already got German. They chose Verkauft sich schnell
 
@JeroenVannevel that seems to be a better translation...
 
@DanPantry ouch
 
what does?
 
0
Q: JavaScript constructor-function for currency-conversion

st88I've made this constructor-function for currency-conversion. It shall be incorporated into an app I'm planning to implement. So therefore: Any hints concernings flaws as well as suggestions are welcomed. I would be especially interested in tipps concerning the object-orientation and the doc...

0
Q: How to make my code faster?

Joemy code takes a long time for big graph How can I make it faster? I'm trying to calculate the shortest path for 3 path's using queue but for big input my program crushes I'm stuck here, Can someone help me? def bfs(graph, start, end): queue = [] queue.append([start]) while queue: ...

0
Q: Updating certain values in text file

SunnySo I need to update some certain values within text file based on actual values there. Any advice on making it more effective or just readable is appreciated. Example text file: Lalala There is tons of text in this file log-12345sr And somewhere within There are log file names log-23456sr So...

0
Q: Income Simulation programifier

Yongushttp://pastebin.com/7UqD0gwF I'm looking for serious feedback on my first serious program. This is a program to calculate PvZ income over time of sunflowers and sunshrooms on nighttime pool levels. Shrooms might have an obvious advantage but this program was borne over the idea that once all ...

 
@ardaozkal Yeah, turns out this is causing a bug
Just done a git bisect to find that this bug has been in the app for eleven months
 
9:54 AM
@DanPantry Did you manage to fix it?
Anyone know how to iterate over every number not divisible by 2 or 5?
 
@N3buchadnezzar you could try some list comprehension
 
Well i do not know how long it needs to be. IT is part of a while loop
I could iterate over the odd integers, and then skip every 5. However it seems a bit hackish, and slow to check if every number is divisible by 5.
 
@N3buchadnezzar num % 5 == 0?
 
well, the simplest way it's to do n%k==0, right ?
so you'll have to check every number
 
yeah, I sorta wanted to avoid checking every integer since I know exactly where the fives are
 
10:06 AM
well, so you know the index of the numbers that are divisible by 5 ?
 
@N3buchadnezzar You could slice, or use itertools.islice
 
@N3buchadnezzar Yes, it's simple, just don't understand why it was introduced in the first place
 
> i = 1
while i < limit:
i += 2
 
@N3buchadnezzar range?
 
@JoeWallis But I also need it to skip the fives :p (hopefully without doing a check for every number)
 
10:08 AM
1 min ago, by Joe Wallis
@N3buchadnezzar You could slice, or use itertools.islice
 
git is awesome
i need a git mug
 
Talk to @Mat'sMug
^_^
 
git init mug
 
git tag mug
hoenstly though being able to use git bisect then git tag the commit with the bug in is awesome.
 
sudo get mug?
 
10:11 AM
sudo make me a sandwich
 
@N3buchadnezzar At least sudo apt-get install mug
 
srs question: what's the difference between apt and apt-get
 
Apt is the package manager, apt-get is a layer over that.
You can apt, but you usually want to apt-get.
 
apt-get may be considered as lower-level and "backend", and support other APT-based tools. apt is designed for end-users and its output may be changed between versions.
 
89
Q: Aptitude vs. apt-get: Which is the recommended (aka the "right") tool to use?

Vokuhila-OlibaSome time ago I read that aptitude is the preferred tool for installation on Debian-based systems. But when you search around on how to administer a Debian-based system, then aptitude is rarely mentioned. Most people seem to prefer apt-get - and that's even true for the Debian wiki pages! Thus I...

 
10:14 AM
0
Q: Can I subclass UIView more concisely in Swift?

GoldenJoeWhen subclassing UIView in Swift, you are required to have init functions override init(frame: CGRect) { super.init(frame:frame) initMyStuff() } required init?(coder aDecoder: NSCoder) { super.init(coder:aDecoder) initMyStuff() } override func awakeFromNib() { super.awakeFr...

This has been edited and can be reopened (in my opinion)
 
Seems I had my story backwards. Or so.
@MartinR Are you sure? It still smells like example code to me.
Also, the cross-post with SO was never removed.
I have a severe distaste for cross-posts.
 
@Mast pacman -S mug
 
thanks both
 
Let's roll our own so we can mug install rubberduck.
 
relevant xkcd as always
 
10:19 AM
@Vogel612 Error can't install unless user is root, or something. Instead you can use yogurt.
 
actually ... sudo pacman -S mug
 
pip install mug?
 
@Mast It is working code and a question about "Best practices and design pattern usage".
 
@N3buchadnezzar If mug is a Python package, sure.
@MartinR It's a general question about best practices, not about the actual code.
 
0
Q: Photoshop Script to Rename Layers to be Unique

SuperBiasedManI recently tried to dip back into my old JavaScript 'skills' to make a script for Photoshop. It's simply a recursive function that will loop over all the layers in a file and renames any duplicate names to add numbers so every layer name is unique. In Photoshop, an ArtLayer is just a regular lay...

 
10:27 AM
I'm so tired of copypasted code and hard-to-understand data workflows. I'm so going to push back on this after I've finished this feature and just nuke any of those issues in my current codebase next sprint.
The mental gymnastics are not fun.
 
Hi @MartinR
 
Hi
 
oh hi MartinR
 
Is using NSDate() at all accurate to benchmark swift code?
 
I think you forgot the "Reading the faq" technology — JBernardo Apr 18 '12 at 6:38
 
10:37 AM
@overactor Unless you measure very short time intervals (so that the execution time of calling NSDate itself becomes relevant), it should be good enough.
 
Monking
 
Monking @skiwi
 
-1
Q: Java CRON for 00-21 every hour and 21-23 every five minute?

Datta4400Java CRON for 00-21 every hour and 21-23 every five minute ?

 
@CaptainObvious No.
4
 
10:56 AM
@MartinR ah, turns out I was not measuring at the right time
 
@CaptainObvious 2 more VTC
 
Do you have any clue why the lazy version of sequentialFlatten is so slow?
 

« first day (1136 days earlier)      last day (2868 days later) »