« first day (1151 days earlier)      last day (2866 days later) » 

1:00 PM
I have the nagging feeling modern compilers let you get away with it.
 
Yeah, this compiler is letting me get away with quite a bit tho
Like I just removed the function prototype at the top, so that main can't see facts() and it still works fine
 
I think I explained it here, but feel free to comment if I left anything important out.
 
This question would be better suited on codereview.se — aynber 34 secs ago
 
friendly compiler is your friend
 
I simply learned never to do this.
 
1:02 PM
but one day
stab stab stab stab stab
 
Which is why you should take warnings seriously.
 
don't trust friendly compiler.
Write better code.
 
No no, write garbage code, then write your own compiler that converts garbage code into proper code
 
@skiwi ... skip step 1, do step 2, ???, PROFIT
common sentiment among programmers: "this code is crap"
 
@skiwi Vigil
 
1:04 PM
so it could be fed into this compiler
and then proper code!
you could sell that compiler for a lottta money
 
I have a feeling this compiler might be open source, but the definition of proper code would be changed daily
 
@skiwi My compiler is Codereview
Bah
 
@N3buchadnezzar Code compiled successfully, 3 warnings, 2 close votes
3
 
I made the crappy code i posted earlier worse.
Or well it is much faster. Looks worse, and produces the incorrect output.
 
@syb0rg Nice to know another C user.
 
1:06 PM
On the positive side I finally know why it does not work.
 
@Pimgd basically VSDiagnostics
 
@pacmaninbw he's been referred to as the C god @syb0rg
 
@JHache We do not sow?
 
> Compiler has refused to compile code because it is unclear
 
@JeroenVannevel depends on whether you have posted a CR question so I can shoot at it's internals and make it better
 
1:07 PM
@JHache Cthulhu?
3
 
I'm too busy enjoying my lunch break
wait
 
@skiwi compiler, compile code! "Unclear what you're asking, human"
 
That ended half an hour ago
 
@N3buchadnezzar @Mast what
 
should have ended half an hour ago
 
1:07 PM
sudo compile code
 
I compiled and ran your original code, and was very surprised that it worked (probably the compiler being too nice). Compiler's give warnings for a reason, I treat my compiler's warnings like errors and force myself to fix them. I recommend you get to know some of your compiler's flags and do the same in the future. — syb0rg 1 min ago
 
@JHache Neptune? Poseidon?
 
@Mast enter password for root:
 
*********
 
1:08 PM
@JeroenVannevel Wrong ping, sorry.
 
And it ain't even Friday
 
@N3buchadnezzar nono, just the C god
 
@Vogel612 silly bird a proper terminal doesn't show what you're typing when you're typing passwords
 
@Pimgd I know.. this is the interwebs though. they usually do that
 
Well Chutulu, Neptune, Poseidon and the drowned god are all C god`s..
 
1:10 PM
@N3buchadnezzar That's see gods.
 
Ah, I see
 
@Mast that's kinda the point..
 
Same pronunciation, different spelling.
 
ITR: puns
 
@Vogel612 O RLY?
 
1:10 PM
Think I might be going
3
 
@N3buchadnezzar now to find the god of the nile river
 
@N3buchadnezzar Describes us programmers perfectly
 
~silently points at the big cup of shame
Capital Pun-ishment
 
@Vogel612 that's not a cup, that's a bottle!
 
@N3buchadnezzar Like this guy?
 
1:11 PM
crawls into the big cup
 
@JHache Hapi.
 
@Mast Why is that a thing?
 
@N3buchadnezzar It's the internet.
 
@mast I'm happy you found that
thanks
 
@Mast Everything is a thing on the internet.
 
1:12 PM
> Please be aware that a number of services including SVN, APC, LDAP, RMT, Enterprise Tester, etc are down or have limited functionality.
 
/r/ofcoursethatexists
 
Well, guess I don't have to accomplish much this morning
4
 
@DanPantry Todays risky click
 
@N3buchadnezzar It's actually /r/ofcoursethatsathing and it's sfw
(well, as sfw as reddit gets)
 
@pacmaninbw You have some nice answers too, have some upvotes
 
1:15 PM
@syb0rg I finally found another question like mine, god I am so fucking happy
2
 
@JHache Don't drop f-bombs in chat
 
@N3buchadnezzar brb gotta check this out
 
(I'm saying that for your own good)
 
@JHache I was considering putting a bounty on your question for you, but I didn't know how helpful that would be with your problem
 
Greetings, Programs.
 
1:16 PM
@DanPantry Brainfuck.
 
Hello @Donald.McLean
@Mast ಠ_ಠ
 
@Donald.McLean Greetings!
@DanPantry insert open door joke here
 
@syb0rg a bounty would maybe have helped, but the thought itself is pretty cool of you. I should be able ton figure it out
 
@Quill Do you remember why this was closed?
 
@Mast I don't remember the specific post but the first revision looks off-topic
 
1:21 PM
@N3buchadnezzar Now I'm wondering what the sea equivalent of a furry would be called, but let's not get into that.
 
annnnd it's gone
 
0
Q: which is best: simple approach or late static binding

user3425009I have create two programmes with different approach. Both has same output. which is best? Late static binding <?php class DB { protected static $table = "user"; public function select() { echo 'SELECT * FROM '. static::$table; echo '<br/><br/>'; } public func...

 
Sorry!
 
@CaptainObvious which is best: simple title or late static title
 
puts on business suit
 
1:21 PM
@CaptainObvious off-topic example code where's the context what do you ACTUALLY want to know
 
@Quill Ready for re-opening?
 
@N3buchadnezzar We're programmers, we don't wear suits to work
 
@Mast it looks like it's asking for help writing code, why would we reopen it?
 
because I don't like having answers on closed questions If it works, why not? We've seen worse.
 
it looks like it doesn't work to what the author wants
it looks like programming challenge code but it doesn't meet the challenge reqs
 
1:26 PM
Perhaps I should just stop answering C questions instead :P
 
Or whatever OP intended it to be.
 
cherry picking is a pain
carry on in the nth, context moved over there. This thread is now about spiderman Code Review.SE
3
 
@Vogel612 did someone call spiderman?
 
@Vogel612 Cheers
 
1:28 PM
@CherubimAnand Wow you're fast to join
 
hi @syb0rg
 
Hello!
Welcome to the 2nd Monitor!
 
thanks
 
@Mast Neva
@CherubimAnand One thing I'd recommend fixing is adding braces after your conditional statements
 
@robert lets move the conversation to gist.github.com/sukima/2e53c7df68303eb1f1738cd4b21ed571 since that code review is out of scope for this question. — Sukima 27 secs ago
 
1:30 PM
For multiple reasons
 
@syb0rg I got 3 answers on that tag. 2 of the questions got closed and the 3rd answer was written after it was re-opened.
 
@syb0rg Thank you!
 
@CherubimAnand I used to do the same, but now I'm an avid embracer (heh) of this style
@pacmaninbw Anytime :)
 
yeah! I've seen that being mentioned on some posts over the stackoverflow @syb0rg
 
@CherubimAnand Also declare main as int main(void)
And no need for return 0 at the end of main
I can reference you to reasons behind all of that if you want me to
> All services have been brought online. Please contact Automation Services with any issues or concerns.
Dang it, back to work
 
1:34 PM
@comrade you should probably read A guide to Code Review for Stack Overflow users before suggesting that something applies there ;-) — Shepmaster 39 secs ago
 
can you reference them @syb0rg that'd be helpful
 
@CherubimAnand Two of three reasons in this answer of mine: codereview.stackexchange.com/a/62465/27623
Do you want reasons for the braces?
 
yep got it @syb0rg the 2 concerning int main(void) and why not to return 0 ... yes i'd like to know about the braces (my guess : I just think they improve readability)
 
@CherubimAnand You can do just the indenting, but I would require having this flag given to the compiler if you do
That's a good read there btw
So having braces avoids those problems specified in that article, without the flag
 
I think I found a quiet good solution for this codereview.stackexchange.com/questions/92095/… ... but whats with different heights? — DranikMan 40 secs ago
If this code works (as you stated it does), this is best suited for Code ReviewScott Holtzman 48 secs ago
I can confirm that we haven't implemented that functionality. Shouldn't invalid unit tests be caught in code reviews? :) — Rob Prouse 28 secs ago
 
1:52 PM
@syb0rg Thanks for the answer.
 
1
Q: PHP Image size recalculation function

IMarksI got a function to recalculate the image size based on two settings. Force ratio, force the requested ratio, default the original ratio will be used. Keepsmaller, the uploaded image may never become bigger If keep smaller is not enabled, by default we will focus calculation on the first reac...

0
Q: Use of function literals and function placement

Albert OrlandoSomewhat new to javascript and angular and read in Crockford's book that the hoisting function declaration can lead to issues. Any pointers on how to structure my file would be much appreciated. (function() { 'use strict'; function PlayerProfileStatsCtrl($q, ColumnService, LookupService...

0
Q: Read Com Components from administrative tools in C#

kanisun krishnanRead Read the com component Names and compare the another machine com components Names via windows forms applications

 
@CaptainObvious No
 
@CaptainObvious No No
 
They wanna take me to rehab I say...
 
@syb0rg as far as i could understand... braces must be provided around statements of if else it invokes the warning .... just that's it (or) am i simply missing the point?
 
2:00 PM
@Heslacher There's no limit
 
(read the last 3 messages in reverse order)
 
;-)
 
  if (some_condition ())
    do_foo ();
    do_bar ();
@CherubimAnand That's when the flag would give a warning
Because you indented do_bar(), and probably intended for it to be executed in that conditional only
With do_bar() excluded, it wouldn't give a warning
 
@CaptainObvious Closed.
 
Guardians of the Galaxy Code Review
4
 
2:06 PM
i have 2 questions : 1)does the warning invoke even for `else` statement 2)in my question i need not provide braces for the else statement right @syb0rg as it has only one statement following it
 
@CherubimAnand If you had something like:
 else
    do_foo ();
    do_bar ();
Then yes
And you are correct, you don't need them. But I recommend them
 
Zak
Good News: I've run out of cases for my DB to account for.
Bad News: That means it's now time to start on the UI mock-ups.
 
0
Q: Connect Four in Java for two human players

coderoddeConnect Four kinda caught my eye, and I decided to start from the very basics. Here I have bare-bones implementation for playing the game between two human players on the command line: Board.java package net.coderodde.game.connect4; import java.util.Objects; /** * This class implements the a...

0
Q: Separate Out If-else block into a private Method from Main Service Method

sbmc7I have heard a lot that We should not use if else in main service flow. For example the below code //Main service method public void process(){ String abc = ""; boolean flag = true; if(flag){ abc = "Hello"; }else{ abc = "World"; } . . . } should be l...

 
@syb0rg I've edited the post... thanks for the info. regarding "Wow you're fast to join", it's my holidays, so I tend to be proactive on SE :)
 
If this is working code that you think could be improved, see Code Review. You can definitely simplify it, and absolutely generate random questions. — jonrsharpe 54 secs ago
 
2:14 PM
@CherubimAnand You already have my upvote, sadly I can't give another one haha
If anyone else wants to upvote this wonderful answer, here it is: codereview.stackexchange.com/a/133138/27623
 
haha... no problem! do my actions seem like i'm desperate for rep :/
 
@CherubimAnand Nope, seems like you're dedicated to improving your answer IMO
And learning how to give better reviews
 
@DanPantry isn't it "wanna make me go to"?
 
@CaptainObvious no.
also
> I have heard a lot that We should not use if else in main service flow.
 
@Vogel612 i am not cultured ;-;
@Pimgd u wot
 
2:19 PM
@CherubimAnand If you do like rep tho, I'd recommend sticking around here
 
CR = rep farm
all you gotta do is shoot at code
rant at it
and then wrap it up in constructiveness
then it's constructive criticism
 
Zak
@Pimgd I wish.
 
haha @syb0rg :) thanks! by the way I've always been fascinated by speech recognition and speech synthesis, and i've seen your project Khronos ... but i'm just a first year undergrad so any suggestions for me to begin with?
 
Zak
@Pimgd Not so much in land
 
@CherubimAnand Ah, good I love when people ask me about this stuff
What do you want to focus on?
 
2:25 PM
@CherubimAnand this reminds me of last week when I joined, welcome!!!
 
@Zak You should try land
 
@Zak has always been a special kind of something
 
Zak
@syb0rg Maybe someday. Definitely not today ^^
 
Time to give a demo, brb
 
i really don't know anything to start with ( my_knowledge=0 )... any algorithm's or how to manipulate sound using c would be great...
hi @JHache thanks! but i'm not new to SE :)
@syb0rg is knowledge in c language enough to start with or is it wise to learn some other language apt for those implementations (if so can you suggest the language)
 
2:33 PM
C is awesome, but learning other languages is always recommended.
I'd say Python and Java, personally.
 
0
Q: Android improving code that checks input

leonzI made an Android app, a calculator, that uses buttons for input, Android keyboard is turned off. I have a block of code, that handles the input to string and checks for some things at the same time. The code is completely working, but I think it may feel a little slow on older devices. The code ...

 
Scala - a better Java than Java.
 
thanks @Legato ... right now i could only caste spells into my pc using C :) not in any other language
 
@CherubimAnand haha, I just started asking questions and stuff, but I've been using SE for a while also. I just meant it more as welcome to the chat room cuz you will probably never leave :)
 
@JHache thanks for your welcome then :)
 
2:43 PM
I'd recommend Java, Rust and C# if you want to understand a lot of stuff
 
what if I just want to wave a magic wand and have things work?
 
Java is an easy introduction to OOP and eventually stack vs heap, Rust is essentially easier C++ that can learn you pointers and references and more about the stack and heap and then C# is just improved Java and learns you that there is a difference vs override and virtual
 
@skiwi but wouldn't C++ have more ressources than Rust?
 
@CherubimAnand It depends on what you mean with 'enough'.
 
@skiwi thanks :) right now I've started reading Java
 
2:46 PM
Enough for what?
C is a great language if you want to program on bare metal. C++ if you prefer less headaches.
Python for quick scripting purposes.
So is Ruby.
JavaScript if you want to do Web.
 
@Mast i meant that in light of speech recognition
 
If you want to do sound processing, you probably want something low-level. But it can be done in higher languages just as good nowadays.
A freezer has more CPU than a PC of 10 years old. Efficiency isn't really as important as it used to be.
I think you'll like C++, but if you want to help @syb0rg with his projects you'll be stuck with C anyway.
 
oh! is his total project made using only C @Mast
 
@JHache The tutorial/book for Rust is sufficient in my opinion and there's other resources too, though C++ does have more widespread usage of course
It's just a bit hard to justify C and C++ after having used Rust from personal experience
 
@CherubimAnand C and CMake, if you count the latter as a language.
 
2:52 PM
And to be fair I don't completely understand all the stuff in C++ especially template generics and its friends :P
 
C++ has friends to cheat.
Otherwise it gets too bloated.
 
? How do I do my job, and watch this thread at the same time ?
 
@Gareth By using 2 monitors ^^
 
@skiwi I guess I have a soft spot for C++, I should check out Rust
 
hence "the 2nd monitor"
 
2:54 PM
Now I'm thinking about compiling a list of 'often used' languages with their pros and cons and a small chart for how to pick your 'next' language.
If you keep it objective, it can be done.
 
Javascript:
Pros
- ??
Cons
- It's Javascript
8
~ Mast, 2016
 
thanks for the info @Mast
 
I've said a lot of bad things about JavaScript since I joined this room...
Jan 19 at 15:01, by Mast
@DanPantry JavaScript has only one bug: the language itself.
 
Yes, mostly to me ^^
 
You're the one talking mostly JavaScript :P
 
2:58 PM
as per code review it is manager decision that we need to use enum with unity! — Monojit Sarkar 7 secs ago
 
Ugh, I'm going to wash my mouth with soap.
That's 3x in a row.
 
@Duga lol, why is the manager making technical decisions
 
@Duga poor guy
 
@Duga your manager does the code reviews
 
@CherubimAnand Depends on how fast you want to get up and running or how low you want to go in understanding what is going on machine level wise
 
3:04 PM
@DanPantry There's probably a good reason for that though.
 
@Mast Less headaches? Depends I'd say
 
An enum combined with a switch makes sure there are no invalid options.
 
@CherubimAnand Another thing to consider is portability
 
You can write portable C and fill-in the blanks with CMake.
 
C is basically portable assembler, which can run anywhere
 
3:06 PM
Which is why it's such a good language.
 
Other languages make similar claims, and it's just a matter if you can get a compiler/interpreter on the machine you wish to run the code on
Like Python
 
@Mast Maybe because OP feels like a help vampire
 
I still haven't tried MicroPython...
 
@Mast Python also for machine learning research
Nothing offers more libraries for doing that kinda stuff
 
Also great for combining binaries and piping data from/to them.
And yea, the amount of libraries Python prevents you from writing a lot of code. It's already there.
 
3:11 PM
Especially with the release of Tensorflow? I considered rewriting all of Khronos in Python a few times
 
Prevents is the wrong word, but you get what I mean.
Tensorflow is on my to-do list. It's a long list.
I should put it in Git...
 
@DanPantry do you mean me? :)
 
@Mast I'm thinking I should transfer my TODO file on Khronos to Github issues
 
@syb0rg Yes! Yes you should!
 
@Mast You seem very for that idea lol
Why so?
 
3:14 PM
@CherubimAnand No, not you, sorry, the person I am answering on SO.
 
@syb0rg Makes it easier for us to poke at an issue and help you out.
 
fine @DanPantry :)
 
1
Q: sum over selected numpy.ndarray column and write to a file

BaRudI am trying to write the sum of selected numpy array column and write to a file. The following code snippet is working fine: for i in range(int(ldata[2])): s_u.append(dos2[i][1]) s_d.append(dos2[i][2]) p_u.append(np.sum(dos2[i,[3,5,7]])) p_d.append(np.sum(dos2[i,[4,6,8]])) d_...

 
thanks @syb0rg ! have a great day..
 
3:20 PM
@Mast I'll do that maybe over lunch, definitely by tonight
@CherubimAnand Anytime
 
0
Q: JavaScript Singleton Pattern/Class "Methods"

LansanaI have a library that will be called in multiple places. Here is my implementation: var vessel1 = new Vessel(); var vessel2 = new Vessel(); vessel2 should use the same instance as vessel1. The reason I need a singleton pattern here is because of my _initialize() function. It should only ever ...

 
@CaptainObvious in the same tag?
 
I'm voting to close this question as off-topic because there's no clear question or answer. If you want a code review, try at codereview.stackexchange.com. — deceze just now
 
@Duga We don't want your
 
@CaptainObvious Oh god, it's even worse than I thought.
What on earth is OP trying to do
 
3:31 PM
@syb0rg I'll take a look at it tomorrow :-)
 
@CaptainObvious BTW as far as I am concerned this is example code until OP adds the initialise method.
 
possible answer invalidation by Mast on question by axaysd: codereview.stackexchange.com/posts/133284/revisions
2
 
@Duga We'll allow it... this time
 
@Duga Put the guns down! It's one of ours!
 
Zak
 
3:48 PM
> Aud_Tot = Application.InputBox("How big is your audit", , , , , , , 1)
vbaaaaaaaaaaaaaaaaaa
 
Zak
Somebody looks like they're after some golden tag badge! Another awesome answer! — Mat's Mug ♦ 4 mins ago
@Mat'sMug you say that, but you're still 2:1 in front of me on questions left to answer
I'm not expecting to catch up any time soon.
 
see if I missed anything here ;-)
it's @BruceWayne from SO, paying us a visit!
 
This thread is now about superman batman
 
one by one, we'll get SO's pros onto CR
 
possible answer invalidation by Jammeh Carr on question by Jammeh Carr: codereview.stackexchange.com/posts/133238/revisions
 
3:55 PM
@Mat'sMug that answer... heh, one of the advantages of working on a lint tool is that you can basically haul it over any piece of code and then club people with it
"look, you're doing things wrong!"
 
@Duga Answerer requested code, I'm saying this is good
 
spot something weird in a review? Is it following a specific format? Add a case!
then hammer even more people with it.
 
that was ironically sitting in the sidebar as I was writing my answer :)
 
Zak
@Mat'sMug Are we on a new RD release yet? (After 2.Beta.2)
 
aww yiss it's using the CR ducky
except you can't see the logo but oh-well
 
3:58 PM
it's not CR's ducky :(
 
but, same hair tuft?
 
lol
 
Looks a lot like it though.
If you rub your CR duck enough, I wouldn't recognize the difference.
 
maybe it's the same ducky except without the logo
I wonder how the logo came off
HINT HINT
 
besides, showing the CR logo on RD stuff would be abusing SE's ToS and suggest endorsement
@Zak 2.0.3b was released last Friday, expect another update this Friday
 

« first day (1151 days earlier)      last day (2866 days later) »