« first day (710 days earlier)      last day (3605 days later) » 
00:00 - 17:0017:00 - 00:00

00:00
There are 1283 unanswered questions
~.~
I need to get back to writing answers, life's been getting in the way a bit lately
Can we commit to not starring political/religious messages, perhaps?
I don't even know who @Hosch250 is talking about, and for the sake of my own sanity, since it's still 19 months till the damn election, I'm going to just ignore it... but yeah...
@nhgrif Hillary Clinton.
@Duga This number is looking better.
Yeah, I can unstar political/religious things.
00:04
I didn't want to know.
Yeah, I'll try to refrain from talking about it.
00:26
If a candidate starts talking about programming, that's a totally different matter and might be marginally on-topic.
Al Gore and the intertubes is on-topic?
for the .net peeps -- github.com/dotnet/llilc "an LLVM based compiler for .NET Core"
Two interesting things
1) TinderOS
2) "Now" shows iOS, Android, OS X and Linux... but near future shows Android dropping off...
Maybe Windows Phone kills it off?
No. Where do you see Windows on there?
00:36
I don't.
Just joking.
Welp, that'd be better if the code in the first panel didn't look so bad.
Some people actually do their braces like that.
Why, I don't know.
That's basically the very bottom of my list of concerns with that code.
I laughed on my first day when VS did that by default.
00:42
What else is wrong?
The single = operator, like VB.NET uses?
What the hell is talent += *50;?
Oh, and += -20?
That made me giggle.
There's nothing wrong with += -20 though.
It's the exact same as -= 20
Well, it should really be -= 20...
But there's nothing that bad about it relative to the rest.
I'm not sure what language that += *50 would even compile in,.
00:43
Else()
The = as comparison is weird, but that's what VB does.
*50 looks like a dereference pointer to a variable named 50.
And yes, Else() with parens
@Hosch250 In what language can variable names start with numbers?
@nhgrif I don't know.
Maybe that one?
But worst of all, to me... there is a variable called eat and a class with a boolean property Chocolate
Also, you shouldn't compare against boolean literals.
Your classes, your instances of classes, these should represent things... they should be nouns.
Your instance methods should represent actions... they should be verb-like.
And your properties should be like adjectives modifying the noun that is your instance.
And you could think of method arguments as adverbs.
00:47
Also the fact he's discussing all of this with what looks like Charizard or something, who can't comprehend comparisons correctly.
if this.code == operational {
    cow.abilities.add(fly)
}
If(eat.Chocolate = true)
Yes, @Hosch250 ?
They don't need to do = true
I said that.
4 mins ago, by nhgrif
Also, you shouldn't compare against boolean literals.
00:50
Oh, missed that.
Sorry, trying to chat and create a video at the same time.
But it should be more like:
if (user.consumedItems.contains(Chocolate))
I really hope that's not the server life runs on, in the corner.
Why not? Afraid of cloud-based technology?
2
0
Q: Generating realistic terrain data

Ethan BierleinI have some fascination with terrain generators, so I whipped up this generator in Python. The way it works is pretty simple, but I figure that I should give an explanation for those who don't want to try and figure it out. The initial 2D terrain array is generated with a provided width and hei...

0
Q: Website monitor - if site is down, kill the process, contact admin and restart server

MikeiLLMy python-based web server (tornado module) is pretty complex and keeps going down (seems like usually in the middle of the night), so here's a bash script that kills the process, restarts and emails and txt messages me: #!/bin/bash NOTIFYEMAIL=<my_email_address> SMSEMAIL=<cell_phone_number>@<ca...

@nhgrif Have a star my good man.
00:57
have two.
hello, all
Hi.
Just leaving, I'll let @nhgrif entertain you.
OK. <reaches for popcorn> entertain me!
I've been doing some long-ish C++ reviews lately and thought I'd take a little break.
That's something I can understand.
I took a break for a few weeks.
It will probably only be a few hours for me. :)
...this time anyway
01:10
0
Q: Write ToLower As Efficient, Portable As Possible

Jake MI am challenging myself to try to attempt to write a function that is as efficient, portable and failsafe as possible. The function is very simple and just converts a string (or wstring) to lower case. Are there any improvements you think I could make and any errors I have done? #ifdef UNICODE...

@CaptainObvious: looks like it also needs a [:reinventing_the_wheel:] tag
I need my pillow.... that's what I need.
AOT was what Swift uses, no?
@JeroenVannevel i think you're thinking of ARC
01:29
0
Q: What's proper implementation for getting device's location once in Android?

diegoaguilarIn my Android app I need to get device's location once after user clicks a button. I don't really need to keep updating localization after I get the location coordinates. I created a class which uses Location Manager in order to get the localization, whole code is part of an AsyncTask. In my Ac...

0
Q: Insert into a multidimensional array the same variable with multiple values present in a Query String

Mecher I'm trying to get the values from a Query String and add them to an array inside of an array. The output Query String is something like: add_to_cart.php?product_id=4&product_name=Pizza&quantity=1&additional_id[]=1&additional_quantity[]=3&additional_id[]=4&additional_quantity[]=5 I need to get e...

 
1 hour later…
02:42
0
Q: Consecutive Primes challenge at CodeEval.com

YanI am working through a new challenge on CodeEval.com and i think i am getting a correct result but i can't get through their grader. I am not exactly sure where error is. I didn't post this on stack overflow because i also would like to get your opinion on the code as well. This is the assign...

03:23
> I wonder and care for:

- Is this really getting actual location?
- Is this really finishing after onPostExecute?
- What if I wanted to keep updating for a few secs later?
- I'm not implementing LocationListener ... so?
@CaptainObvious Is that ^^ on-topic?
just wrote a little script to make waiting for graduation more bearable
it outputs gems such as
It has been 196 days (28.0 weeks) since Code Review's graduation was announced.
We have waited more days than the number of episodes of Matlock ran on NBC from 1986-1992 and on ABC from 1992-1995!
Maybe I'm reading too much into it. It just reads to me like

- Is my code working as intended?
- Is my code working as intended?
- How do I write this feature that's not written yet?
- I'm not implementing LocationListener ... so?
@sᴉɔuɐɹɥԀ that's how i read it too
Well, I left a comment, we'll see how that goes.
I'm worried that I'm not really calculating location.. And that is not a good implementation — diegoaguilar 53 secs ago
@mjolka That's pretty funny!
04:28
You might have more luck at codereview.stackexchange.comGreg Kopff 1 min ago
04:50
0
Q: Possibly incorrect results from War card game simulator (Python)

Alex BSo my teacher wants us to create a program that runs n games of war and calculates the average number of battles, wars and double wars that occurred. He has very specific rules (not necessarily the actual rules of war). I know there's some redundant code in the deck building and splitting for eac...

05:03
monking @all
@chillworld monking
what are we going to do today? ^^
the same thing we do every day, chillworld - try to take over the world!
@mjolka are you crazy? I do not want to take over the world, I'll let that to mine AI I'm trying to code ^^
mhh how difficult could it be download a zip file from yahoo mail @work
0
Q: Minimum element in a tuple

overexchangeFor the given problem: Write a function min element that returns the minimum element in a tuple. def min_element(tup): """ Returns the minimum element in tup. >>> a = (1, 2, 3, 2, 1) >>> min_element(a) 1 """ Solution: def min_element(tup): """ Returns the minimum element in tup. >>> a...

05:18
IE neither FF wan't to do it, forwarding to work email doesn't work also
Chrome?
forwarded to gmail, that did it
trying to check out a sample project for someone. He has something what doesn't work
and I'm awaiting on feedback so why not help some people ;)
@chillworld Once you fix it for him, get him to post it on SO ;)
It's already question on ZK forum ;)
I don't know what exactly the tools do and I don't recognize a known pattern in the flood of numbers. But addresses created by compiler may be different from addresses used at runtime because of the image displacement introduced by executable file loader. Without understanding any details I would vote for "or my code" and arranging code review session with your coworkers (1 to 3) should be the easy way out — xmojmr 1 min ago
05:31
damn, italien text in code pffft, it all looks chinees for me :)
05:44
Google Translate to the rescue?
only comments, so I let the code speak to me (still difficult cause he's doing a lot what isn't needed)
a long backend operation and he want's to see updates on the screen. using Future Task etc.
ah okay
06:02
0
Q: Map operation to update data | Hazelcast IMap retuns clone object

ppuskarI have a nested hazelcast distributed map: Map<CountryId, Map<CityCode, Map<data_key,data_value>>> where "data_key" is "population", "literacy_rate" and "gender_ratio". Below is the class where I have implemented a method which adds new city data to a specified country. import java.util.HashM...

0
Q: Max-heap implementation with List

XinI am trying to create max-heap for practive. public class MaxHeap <E extends Comparable<? super E>>{ List<E> list; public MaxHeap(E[] array){ this(Arrays.asList(array)); } public MaxHeap(List<E> list){ if(list == null) throw new IllegalArgumentException("list cannot be nul...

06:18
just removed all the future tasks, created a timer at client side for polling and 1 normal thread
0
Q: Library management system in C++

Jake MI am doing a beginner C++ project and it's simply a library management system where a student will hire, give back a book, book and hire records are stored in a binary file etc. I'm approaching the project as though the project would be used by other developers and that I need to design the clas...

07:14
0
Q: looking for a coding mentor

Nate_tyroneI am front end developer extremely keen to progress as a developer, i not if this the right place to post something like this... i am currently looking a strong developer that can mentor me, conduct code reviews in the following, HTML, css/sass and Javascript. I am not a beginner however i am l...

07:30
Exactly as Docteur said: "Good luck". You need to try to come up with a solution on your own. If you have a problem with one of your ideas, come here and ask. if you want to know which one is the most elegant, ask on the codereview sister site. — stefan 27 secs ago
0
Q: when framework version changed getting error while buildiing the project?

Navya SriI have changed my project framework from 4.0 to 4.5.1 then i got an error showing as below.. Error 5447 The "CompileWorkflowTask" task failed unexpectedly. System.ArgumentException: The resource string "UnsupportedProjectType" for the "CompileWorkflowTask" task cannot be found. Confirm that...

07:50
@captain off topic
08:13
0
Q: Exposing includes to client over webservice for database queries

Nick WilliamsI am using a CQRS type patter for querying data in my application. I am currently using entity framework to connect to the database. public class GetCustomerQuery : IQuery<Customer> { public string CustomerId { get; set; } } public class GetCustomerQueryHandler : IQueryHandler<GetCustomerQ...

0
Q: Deep/recursive join, all, any, sum, len

TigerhawkT3I keep forgetting that the standard join() can only take a single iterable, so I made a few functions that act recursively on any passed arguments. Somewhat ironically, the deep version of join() isn't called by the user, but only within the deep version of sum() - the standard sum() breaks and t...

You should try posting this at: codereview.stackexchange.comTerryA 52 secs ago
Because it's a short script and just a short optimization, i though it would be okay to post it here. Should i really go on CodeReview ? — FunkySayu 1 min ago
08:47
0
Q: single value computation

gdsI'm writing a code to compute a single value answer to a given numbers in integer array such that step sum is calculated till only 1 number is left. for example: input: 3,5,2,6,7 output is computed as (3+5)+(5+2)+(2+6)+(6+7) like this till only i have a single number left. 3 5 2 6 7 8 7 8 13 15...

08:58
@FrankSchmitt thanks for code review, corrected — Pavel Gatnar 1 min ago
09:08
How is the workflow here? Does the code review take place at each developers individual computer, before they check in their code to version control? Maybe it would be better to have the devs check in in a dev branch, and code review to review that branch and then check in into another branch. — tobias_k 26 secs ago
09:31
0
Q: Cartesian product of two tuples - python

overexchangeFor the given question: Fill in the definition of cartesian product. cartesian product takes in two tuples and returns a tuple that is the Cartesian product of those tuples. To find the Cartesian product of tuple X and tuple Y, you take the first element in X and pair it up with all the elements...

by 'organize' I meant should there be an order between negative and positive if conditions? at code review I got both first should be negative conditions and its block of code and also positive first, so not sure what is best anymore — Andrea 1 min ago
Monking
09:48
Monking
10:20
Monking
10:32
0
Q: Return true if the elements of an array do not contain one or the other

alanbuchananI am gradually completing the CodingBat exercises for Java. Here is the one I just did: Given an array of ints, return true if it contains no 1's or it contains no 4's. Here is my code: public boolean no14(int[] nums) { int oneCount = 0; int fourCount = 0; for (int i = 0; i <...

@JeroenVannevel What's AOT exactly? There's nothing in Swift called AOT, but I don't know what the implications of it are (besides that I just read it stands for "Ahead of Time" compilation)
Hey Gareth great to see you hammering away at answering again ;-)
@nhgrif Ahead-of-time compilation is ordinary compilation, when it needs to be contrasted with Just-in-time compilation
@rolfl Thanks
Oh. So then yes, Swift uses "AOT", I suppose.
JIT compilation often has optimization advantages as well, but the time for compilation is added to the runtime.
10:42
Right.
I'm pretty certain there's no JIT in Objective-C or Swift.
It's all AOT... plus ARC.
Which isn't really related, but I guess that was the point of confusion.
Though ARC means no garbage collection which is an optimization over any garbage collected language.
JIT is really annoying to implement on Windows, because you have to support x64 exception handling
@nhgrif that's not technically true.
Haha, let's have a garbage collection flame war
AOT produces just as much garbage, it's just collected when the method exits.
I'm talking about manual memory management versus garbage collection.
10:45
Also, Garbage collection and AOT/JIT are orthogonal
ARC has nothing to do with AOT/JIT.
ARC is not orthogonal to Garbage Collection.
0
Q: Flatten to get all child controls of certain type in a UIView

softbearextension Array { func flatten<TResult>(transform: (T) -> TResult?, childArray: (T) -> [T]) -> [TResult] { var result = [TResult]() for original in self { let transformed = transform(original) if transformed != nil { result.append(trans...

Generally speaking, manual memory management is more efficient at run time, and garbage collection is more efficient at develop time, and ARC is the best of both worlds.
And I am leaving for work. If necessary, I'll pick this up from my phone.
10:47
I typed ARC instead of AOT.... and no it's not necessary
Breakfast is necessary
There are several problems with reference counting: (i) it increases the size of every object by a reference count field (this is especially poor for leaf objects like integers);
(ii) every time you copy or delete a pointer to an object you have to update the reference count of the object, which results in poor cache performance because the object has to be forced back into the cache;
(iii) deleting an object is a potentially unbounded operation (because when you delete an object you decrement the reference count of all the objects it points to, and so these might have to be deleted too, and so on recursively) which makes it hard to meet real-time latency guarantees;
(iv) you need a garbage collector anyway to deal with cyclic structures, so why bother with the reference counts in the first place?
0
Q: CSS mask clipping and overlay svg to achieve a two effect

NewKidOnTheBlockI am currently attempting to create a two SVG overlay / masking like the image below I have created a Svg for the overlay. As it stands i am trying to create two elements one for the green side and one for the blue side. For what i am trying to achieve is this the best approach, if it not wha...

11:07
What's a "leaf" object?
one which has no further references to other objects ;-)
It's also what adam uses to cover his object ....
3
Reference counting in ARC only applies to actual objects.
See the entry for leaf object at the Memory Management Glossary.
Garbage collection doesn't apply to reference cycles... Except if you count the OS cleaning up ALL of my app's memory when the app exits... Which doesn't effect my app's runtime performance.
That's just another way of saying "cyclic structures leak"
11:10
Yes, they do.
Doesn't your point 3 apply equally to GC except that GC already takes more time when it decides to delete stuff?
So if you have a program that uses cyclic structures, you have to do your own memory management on them — deleting references to break the cycle when you know that the structure is dead
Well, you can have weak references in a cyclic structure without a leak.
A references B strongly and B references A weakly.
This is actually a very common pattern in Objective-C.
Strong/weak references are another complexity in memory management ....
11:13
Right, that works as long as your data structures are tree-like (that is, it's clear for each reference that you have a "parent" and a "child")
Sure.
But not all cyclic structures are tree-like. Consider something like basic blocks in a compiler
And for all the GC haters out there, many times the program runs and never needs to do any GC.... so, no GC is always faster than immediate GC.
But that then just leaves you with a larger memory footprint.
nope, the program exits.
11:14
I'm not a GC hater.
I prefer GC to manual memory management... I don't want to have to write memory management code.
If there's no need for GC, there's no need for reference counting either (you can just leak everything) so I don't think that case is particularly helpful to consider
There's that too...
No, I am talking smaller/simpler programs that are designed to be short-running.
Yes, and with manually management, you can also guarantee there is no cleanup code...
they terminate naturally before their memory pressure exists...so no GC ever.
11:16
You can actually have more of a guarantee by simply not putting in any of the memory management code.
There are so many swings and roundabouts in memory management that there is no way to assert that one system is always better than another.
I don't think the "small program" case is interesting for reference-counting vs garbage collection — the difficult case is "long-lived program with complex data structures and real-time latency requirements"
When you have real-time, or even just hard latency requirements then many languages struggle.
I typically work in the" long-lived large program" Java world (256GB 128-core IBM machines running large services).
latency guarantees are very hard to manage in that, so you typically don't.
you mitigate, not guarantee.
or you write in C++ ;-)
Why c++?
Becasue C++ does not have processor stall times due to garbage collection.
11:23
^^^ that
The Java collector is not a real-time garbage collector
So... that's why you use ARC.
See my point (iii) above — reference counting has stall times too!
It's a shame that the Java collector is so poor in this respect
Gives garbage collection a bad name
Java has one of the best and most optimized GC out there. I don;t know of a language (or should I say runtime) that has anything like the amount of research done on its GC.
There are different Java VMs out there, but some of them seem to have a stop-and-copy collector
Or at least, the stop-and-copy collector is the default, and you have to go through a complicated tuning process to select a more appropriate collection algorithm
11:30
There are at least a dozen Java GC's out there.
they are each tuned for specific workloads/situations but the default one is seldom the right one to use if you have a large system running a long time.
Most Java machines (standard out of the box). Use a three layered approach. They have the two short term quick stores. The two layers of older generational stores. And a spcial store for class definitions.
Of course. Java allows you to customize.
Java8, by the way, has done away with the perm-gen space.
Requires a great deal of expertise
That's another thing about Java - because the language is independent of the runtime, you can actually change the entire memory model without changing any application code.
Yep, No argument that GC is a pain in the arse and requires application specific tuning of a million and one little knobs and even then its still not good.
11:34
s/not good/not perfect/
OK
s/not good/not great/
Right, but that's not a fundamental feature of GC, it's a feature of how the Java GC has been developed — you could imagine an alternative tuning model where you specify your application requirements to the system and it configures itself accordingly
I think we all agree here .... three folk who have been through the grinder a few times.
If you have an example I will hire you tomorrow to come and help out team.
For example, you could have an interface along the lines of "I don't care about pause times, I only care about throughput" or "I need pause times to be at most 1 centisecond" and it would choose accordingly
11:36
The real-time Java VM has some of those pre-constraints.
I know the IBM Java folk have invested a lot of time/money to allow the IBM VM to be configured with limits of that sort.
> Metronome is a deterministic garbage collector that offers bounded low pause times and specified application utilization for standard Java applications. The reduced bounded pause times result from an incremental approach to collection and careful engineering decisions that include fundamental changes to the VM.
Haha, presumably they know the collector utilization prediction is poor
(I deduce this from the way the collector tries to do as much work as possible as early as possible given the constraints)
If the predictor was good they wouldn't have to do that, they could smooth the work over the collection cycle
Yup, in a sense, it assumes that each X units of wor will require Y units of GC. If you make that a hard, predictable, and deterministic process, then you can guarantee your latency and availability
Or they could just switch to a better language like C++ which has fine grain deterministic garbage collection.
better is such a subjective word ;-)
But now I have to go and research if I can use IBM stuff in Hadoop.
11:43
Of course you can ;-) (I do work for IBM, and I know the Java compiler folk).
@rolfl That's exactly what they haven't done! If they could accurately predict the GC utilization, then they wouldn't have a picture like figure 5
For the record, you should absolutely 100% do a comparative test between the IBM JRE and the Oracle one. Their default tunings for long-running applications, and the degree to which they compile down repeated 'hot' code, are different.
The IBM JRE does not always win, but when it does, it often wins by a fair margin.
I'll get the team on that.
IBM does have a windows version of the JRE, but their linux versions are more competitive..... I presume you're linux based?
0
Q: Class vs Struct for storing data

Bharathram AttiyannanWhich would be a better data structure? In the sample code, I am using a DateTimeData class/struct for holding a few properties. If I use a struct I am forced to use ref keyword when passing between methods where I expect the properties to be updated. What is the correct approach for storing val...

11:50
@GarethRees I see... yeah, they have set it up so that the utilization is a minimum, not an absolute.
when a GC cycle is needed, it interleaves the GC in a way that never impacts the application to below the SLA.
this does not make the metronome GC deterministic, just makes the runtime never have stop-the-world GC's....
But Metronome looks like a good design — it's an incremental collector with a write barrier. Utilization prediction is hard and I appreciate why they don't rely on it
IBM often builds special case tools like this to solve particular problems for particular customers.
There is a low-likelyhood that these things solve everyone's problems.
I know of at least two GC models that are 'in the works' using 'special resources' that are in the pipeline for IBM Java. For adequately equipped customers they will make a big difference
I see they don't have incremental scanning of stacks, though, so they can't actually guarantee pause times. "Application developers should ... avoid using very deep stacks in their RT applications"
12:14
@rolfl Yep ubuntu
posted on April 14, 2015 by Atul Shanbhag

You have a number of stones with known weights w1, …, wn. Write a program that will rearrange the stones into two piles such that weight difference between the piles is minimal. Input contains the number of stones n (1 ≤ n ≤ 20) and weights of the stones w1, …, wn (integers, 1 ≤ wi ≤ 100000) delimited by white spaces. Your program should output a number representi

Uh...?
Because it's deleted?
codereview is for review of working code — Matt McNabb 1 min ago
0
Q: Fastest sum of absolute values of 32 differences

maaartinusA long should be treated as a list of 32 unsigned numbers, each of them just two bit long. So 0x1234F... represents {0, 1, 0, 2, 0, 3, 1, 0, 3, 3, ...} and 0x55AA0... represents {1, 1, 1, 1, 2, 2, 2, 2, 0, 0, ...} Given two such lists, I need to compute the absolute values of the pairwise d...

0
Q: Finding minimum difference between consecutive numbers

Atul ShanbhagYou have a number of stones with known weights w1, …, wn. Write a program that will rearrange the stones into two piles such that weight difference between the piles is minimal. Input contains the number of stones n (1 ≤ n ≤ 20) and weights of the stones w1, …, wn (integers, 1 ≤ wi ≤ 100000) del...

12:30
How tricky
It explains why only static methods use call and non-virtual methods still use callvirt
NREs, yawn.
13:01
0
Q: Hibernate insert with foreign key

MrRisoniΙ have the following database SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE IF NOT EXISTS `Authors` ( `AutID` int(11) NOT NULL, `Name` varchar(50) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; INS...

Greetings, Programs.
ugh. Fanboys with no life ▼▼▼ JK LOL
Jeez, who is this @EricLippert guy anyway? You'd think he designed the language or something.... — mikeTheLiar 16 hours ago
Good Monking, User.
Anyone versed in MVC want to take a look and give a better answer than I did? ▼▼▼
1
Q: Approach to MVC 4 windows group security to enable/disable controls in view

ChakaThere are 3 window groups to add users and the application uses MVC 4. Here's my approach to add security attributes to my controllers and pass user's role to the view in order to enable/disable controls. I'm looking for ways to approve the code. Webauthorization.cs (the logic to check user's role

there hasn't been a whole lot of attention to this question, and I don't know MVC all that well yet, so I figured that someone else could probably give a better answer.
@Lyle'sMug why is debugMode not a boolean? lol
Shouldn't even be a field at all
There's #debug for that
3
@RubberDuck it would have to be converted
13:15
@Lyle'sMug Probably because the question is really poor — what window groups? what users? what security attributes? Why "approve the code"? etc.
> ConfigurationManager.AppSettings["DebugMode"]
Compiler directive would be perfect here actually. I didn't even think about that, the code was so messy to start with
I am going to add that to my answer @JeroenVannevel unless you are already working on one?
Nah, you can add it
I like compiler directives...lol
Whoops of today:
Trying to implement RSA and having both the signature and the public key provided by an untrusted source
it's about as secure as having the login screen check if your password field matches your repeat password field, rather than the password in the database
14:00
Doctors are also expensive. Glad I'm insured.
^ It depends on the country you live in :p
0
Q: Sintax form PDO

MarcoI was able to run the form to update the data of the user profile, for the moment is in a rough version, but I know that can be improved. I post what I did, I hope you could help me to improve the code that definitely is unclear and with defects. //form update if ((isset($_POST['submit'])) || (...

14:17
setCompany = (company: Company) => {
  // This is so stupid
  this.ShareSvc.Data.CompanyId = company;
  // Why can't we just use angular the wait it is meant to be used instead of abusing
  // it like this. I'm going to need a big tub of icecream to get over this.
}
14:28
Something like this using encoding/binary, perhaps? — tadman 1 min ago
@DanPantry or a shot of whiskey. Pick your poison I suppose.
I wonder if my answer to an exam question last Friday is okay...
As question they wanted me to give an alternative to testing to find bugs, and I said that an alternative was to just ship the program and wait for the bug reports to roll in
3
I would have just said that all bugs are unintended features
And you should welcome them with open arms
@skiwi Make a demo. Programs always fail during demos.
"now if you'll take a look at this... oh it was working on my machine 5 minutes ago"
every programmer ever
14:38
I know failing demos... lol
But only when the boss is around!
Damn sentimental code
There are no bugs. Only more tasks (aptly named "Fix this bug")
@Rainbot // FIXME
So... I'm doing university and am mostly experienced in Java; I get an email from a recruiter saying that she's interested in my profile because I'm doing HBO (grade below university) and she's a .NET recruiter...
Recruiters are almost always circulars unless you got in contact with them first
@skiwi If you can Java, you can C#.
14:40
Was via LinkedIn
I had an email from a recruiter asking for a senior C++ developer
with 10 years experience in embedded systems
Come to the dark side @skiwi.
@RubberDuck Yes, that I can imagine, but messing up university and HBO is a not-done in my eyes
10 years ago I was embedding lego in systems (my mother's foot)
4
Yeah.... recruiters.... they just don't know man. They just don't.
14:41
A lot of recruiters are also not technically minded
They are salespeople
Damn right htey are.
Obnoxious salespeople...
I can't complain they got me my current and previous job.
But I can't help but feel I would have higher pay if I found a job w/o a recruiter.
Or have a bettter cultural fit
@DanPantry I think it's going to be pretty hard to get a higher pay without a job
Or I misread your sentence there
......................
i have the dumb today
14:55
This is rather interesting... a new law will be accepted over here in the Netherlands soon (tm)
In that law you'll have the right to work at home when you are employed, if your boss does not agree, then he needs to reject you with a motivated answer
And saying that working at home is not normal in that company is not an acceptable answer
Time to mess around with the View part of Spring MVC...
Whats up!
0
Q: Model-View-Presenter

Dave JohnsonI work on a .NET application that very loosely followed an n-tier kind of architecture (the business objects (not logic) and data access were split out). We are now looking to start to refactor the code into an MVP architecture. Based on some previous work done by someone else, I just refactored...

@SeanParsons Edumaction.
i'm at a halt in the development and need some help
15:12
Unfortunately, it's a bit hard to review code like this because the code you are showing is example code rather than code that you're actually using in a real project, which means that a lot of context has been stripped away. Unlike Stack Overflow, we prefer to look at real code instead of example code. Please see the meta question: Why is hypothetical example code off-topic for Code Review?RubberDuck 31 secs ago
more a question than anything because i haven't implemented it yet
@RubberDuck You mean 'light'?
@skiwi OK, I guess I'll just twiddle my thumbs at home while a mentally projected image of myself will do the packing/shipping/receiving/truck driving/snow plowing/welding/whatever. Get over it.
15:32
There is a dedicated site codereview.stackexchange.com for the review of working code, so if OP has fixed the code (s)he might post it there for possible improvements. — Martin R 1 min ago
I wonder if it's not a Code Review question: codereview.stackexchange.comMichał Szydłowski 1 min ago
Any faster solutions? codereview is better suited for this — Bhargav Rao 39 secs ago
0
Q: Replacement for 'for-loops' in PyQGIS (Python 2.7.5)

dof1985I'm using Python 2.7.5 in a GIS environment (namely: QGIS 2.8.1, or PyQGIS) sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0) I wrote my first code which is attached below. Its aim is to identify spatially identical Polylines (i.e. overlapping) and sum a value from...

0
Q: How to make an algorithm without nested loops

fuschiaI have a program that uses a lot of nested loops because I am terrible in creating an efficient program. For example: for (String item : p1unique){ ArrayList<String> p2 = g.getOutEdgesToP(item); Node n = (Node) nodeMap.get(item); double weightsourcepaper = n.getWeight(); if (p2!=...

I agree @Kasra but codereview is the better site — Bhargav Rao 1 min ago
codereview.stackexchange.com may be more appropriate place to ask such questions — BЈовић 1 min ago
15:51
0
Q: Basic Java statistics class

AgostinoI noticed there's some code on StackOverflow that is, to put it mildly, suboptimal. I'm posting here to see if we can provide a better solution. Here's a proposal for fixing it. The approach is to provide a small utility class with static methods, so it can be used just like Math.method(...). ...

0
Q: Printing multilevel container?

simplicis veritatisI have these struct(s) to keep data about temperature measurement: // data structure representing day struct Day{ vector<double>hour; Day(); }; Day::Day(): hour(24){ for(int i=0; i< hour.size();++i) hour[i]=not_a_reading; } // data structure representing month struct Month{ int ...

16:02
If the code works as intended, this could be a good fit for the Code Review site as @BЈовић mentioned. If you do decide to post it there, please delete it from Stack Overflow so that we don't have duplicate questions. — Phrancis 15 secs ago
If you have working code and are looking for improvements, CodeReview might be a better fit than StackOverflow. — dcastro 20 secs ago
That looks like a bit of a strange way of creating a new Random. But I agree with @dcastro - probably best ask on Code Review. — Wai Ha Lee 1 min ago
anyone here familiar with JS?
Bunch of people here are (not so much myself) can you be more specific?
This question might be better suited for Code Review. — Steve 1 min ago
Angular.js
16:18
Shuffle and OrderBy don't change the value of the elements. They don't need to be in any particular order, and the values stored in each element need to be changed by random increments. I apologize, I'll check out CodeReview - thank you. Good call on creating rnd outside of the loop - not sure what I was thinking there. And I suppose the default seed should be fine - I just generally avoid the default seed, purely out of habit more than out of necessity. Thanks everyone! — Jesse Williams 1 min ago
1
Q: Comparing cells of two Worksheets

NicoWith the following Code I try to compare the content of two Worksheets. The first column contains a key that is unique and the following columns contain data that I want to compare (My data sets contain around 7000 rows and up to 40 columns). My question is if there is a way to make the code ru...

Should I or shouldn't I answer the Equal Opportunity questions when I'm given the chance "I don't wish to answer"?
[Code review to help you understand what you are doing] 1) A good IDE would flag list = nil with, "The value assigned is not used. Consider deleting the assignment". 2) local list = list doesn't do anything but shadow the original list variable (the parameter, which is effectively a local variable). Of course, those statements have be dropped in the answers. — Tom Blodget 1 min ago
I'm a healthy young white male from a good background so I don't exactly apply. Would it be frowned upon to not disclose anything? Does that get me to the back of the heap?
16:45
Sounds like an Academia or Workplace question.
Since this code works and your question is about potential code improvement, you could consider asking this question instead on Code Review. Just don't cross-post on both Stack Overflow and Code Review. See also what is on-topic for Code Review. — ryanyuyu 1 min ago
@200_success cs61A2014 and cs61A2015, syllabus aspect, which one is better?
@overexchange - why is that question appropriate for pinging someone for?
And obviousyly, the 2015 one is better (without even following the links).
@JeroenVannevel If you tell them you are a healthy young white male in the US, it will put you at a disadvantage.
If you refuse to disclose, they won't know, but they will probably automatically assume you are a healthy white male anyway.
You do have the young going for you (they'd probably rather hire young than old), but it hurts if you don't have the experience...
00:00 - 17:0017:00 - 00:00

« first day (710 days earlier)      last day (3605 days later) »