« first day (1050 days earlier)      last day (2981 days later) » 

8:00 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Displaying available destinations using Angular.JS
 
If this is working code, the it is off topic here and should be in the Code Review Stack Exchange, where people critique and make suggestions for improving otherwise working code. — MatthewMartin 31 secs ago
 
I think we're out of Tic Tac Toe titles now. This question must've gotten very hot quickly, too.
 
I'm voting to close this question as off-topic because it belongs on Code Review codereview.stackexchange.comMatthewMartin 39 secs ago
 
hey @BernardMeurer
 
8:15 PM
@DanPantry Cheking Jekyll and bootstrap out
 
Speaking of if anyone feels like doing some tag editing... Untagged TTT questions
 
possible answer invalidation by Jamal on question by user3995789: codereview.stackexchange.com/posts/123320/revisions
 
8:38 PM
@PinCrash haha, false positive:
7
Q: Connect 4 (glorified tic-tac-toe) implementation

InBetweenI'm posting here my implementation of the game Connect 4. It's obviously a pretty trivial game and code but I'm primarily interested in any advice concerning improvements to the code structure: types, dependencies and coupling, concerns, etc. I'm interested in attacking more complicated games bu...

 
This answer made it back up to -2 so it's not faded anymore. :(
 
> Get into the habit of placing the bodies of if, for, else, etc in curly braces, unless you have a VERY specific and convincing (to someone else) justification not to. Such things are strongly recommended in most style guides for a good reason. And remember that indentation does not change the meaning of code in any way.
I have no problem with this statement
 
@Mat'sMug You still got flags to spare on SO?
 
> However, although it answers the question as asked, this is NOT a technique I would ever recommend. There are so many ways that such hacks could confuse programmers - including yourself in future - that it is simply not worth it. Code that is easy to misunderstand is easy to get wrong.
 
Ran out of mine
 
8:43 PM
or this one
 
0
A: Removing Spaces from a String in C?

Yahya05syThis is a proof that my method is tested and working 100% properly

 
sure, where?
 
Anybody here willing to donate 11.50 to PPCG for avocadOS?
 
avocadoOS?
 
11.50 what?
 
8:44 PM
PPCG?
 
@Hosch250 usd
 
Nope.
 
@BernardMeurer a new OS that runs on jQuery.
 
@BernardMeurer NAA'd
 
@BernardMeurer Programming Puzzles and Code Golf.
 
8:45 PM
@Mat'sMug Thanks... ;0
 
It has too much jQuery.
 
Yikes, sorry mate jQuery gives me cramps
 
and Id not in
  (select Id from Posts
    where cast(Tags as varchar(200)) like '%connect-four%')
wat? lol
 
OS' have to be done just like good websites: with assembly
@Mat'sMug Thanks mate
 
@Mat'sMug whoops lol
well, it works doesn't it ;_;
 
8:46 PM
@Mat'sMug Comments explain the downvotes.
 
unfortunately, it does
 
0
Q: ld: unknown option: -T (mac)

Óliver MániSo, i'm trying to use the ld command to create kernel.bin file from boot.o and kernel.o, so, i'm trying to make a small operating system, i'm using Mac os x El Capitan, and when I type in terminal: $ ld -T linker.ld -o kernel.bin boot.o kernel.o and I will get this message: ld: unknown option...

Another one
 
Does anyone in here know how to make a bootloader?
 
At the end of the day, drive-by SO users are looking for snippets to copy-pasta, and that answer provided a bad-practice copy-pasta.
 
I swear my review duty will be done soon ;-;
 
8:47 PM
@BernardMeurer yup, we know.... But our goal is to have it run jQuery natively.
 
Did I just miss a PPCG-fest?
 
^^
 
Announcement: jQuery is bad for most conventional tasks. Do not use it unless you must.
 
@EasterlyIrk Make JQuery run assembly and I'll support it
 
@CᴏɴᴏʀO'Bʀɪᴇɴ making an OS isn't a conventional task, is it?
 
8:49 PM
BTW, this is old but brilliant (and no accepted answer yet) - codereview.stackexchange.com/questions/55014/…
 
@Mat'sMug True. 'twas just a simple announcement ^_^
 
@BernardMeurer you can just render the GUI with HTML and JS
 
"It looks like you're trying to make an OS... you should totally drop that and use jQuery instead."
 
also webassembly
 
If you're trying to make an OS... why?
 
8:50 PM
in The Nineteenth Byte, 16 hours ago, by Downgoat
@AlexA. you should totally drop operating systems and use jquery
 
If you're trying to develop your own programming language... why?
 
@nhgrif ^^
 
@Quill GUI? Heretic
 
@nhgrif I agree with the comments, but the answer is answering the question. I downvoted the question.
 
@nhgrif Developing a programming language isn't hard. Developing a useful programming language is harder.
 
8:52 PM
If you're trying to write your own code instead of using code already written and test and easily imported in a library... why?
 
@BernardMeurer Terminal is best.
 
I live on keyboard shortcuts that require assistance of your coworkers to get done
 
If you're not writing automated tests... why?
 
"Someone help press the right shift please"
 
This looks like a question best asked on codereview.stackexchange.commfulton26 53 secs ago
 
8:53 PM
You guys have heard of Test Driven Development, right?
Have you heard of Bug Driven Testing?
 
Sending commands directly to kernel for example, unless you've got some bizarre hands you ain't getting that one done by yourself
@nhgrif Lol, testing
 
Hmm?
 
0
Q: VBscript XLS-to-CSV with minor transform

deucexmI have a system that only outputs reports in Excel 97-2003, and a second system (for the user to look at) that only accepts these reports in CSV format. The reports manager was previously opening each of the fifteen XLS reports, find/replacing all the commas with semicolons, saving as CSV, and r...

0
Q: Auto registering class registry

electrometroI built this auto registering registry to look into a package and import all modules and register any classes that are a subclass of a base class. I use it as a registry for a model's choices in Django and to be able to do a getattr on the class to get properties in a service that processes some ...

 
Testing is for weak people, the bug's only exist when they are experienced. Every bug is a schrödinger cat
 
@nhgrif is that when you encounter a bug, write a test to cover it, fix the bug, and walk away happy with yet another green test so that the bug can't show up again without failing the CI build?
 
8:54 PM
So if you don't search for them they don't really exist
 
@Mat'sMug Sort of ish, yes. But my next blog post takes this a level farther...
 
@BernardMeurer or, if your code doesn't have users yet. users will find the bugs, 100% guaranteed.
 
I started a conversation with our CTO yesterday... this week, I'm going to be coming up with a plan for a lot of this idea of Bug Driven Testing.
 
@Mat'sMug It's legacy code by then
 
Tests confirm whether or not your code works. Bugs confirm whether or not your tests work.
If I can modify your code base an insert a bug, and then run your test suite... if you don't have at least one failing test, your tests aren't good enough, are they?
So for example... if you write func fizzBuzzify(value: Int) -> String and it does what we expect it to do... and your "tests" look like this...
func testFizzBuzzify() {
    XCTAssertEqual("Fizz", fizzBuzzify(3))
}
I could modify that function to look like this:
func fizzBuzzify(value: Int) -> String {
    return "Fizz"
}
your test would still pass
but the function obviously would not be performing correctly... so even though you get 100% code coverage... your tests aren't good enough.
 
8:59 PM
Best development methodology ever
 
Code coverage percentage is a useful statistic, but it only shows you which lines of code were executed during an automated test. Code coverage doesn't show you whether sensible asserts are being made.
 
@BernardMeurer by M.Feathers' definition legacy code is code without tests.
 
By my definition, it's code without tests and documentation.
 
@Mat'sMug That's pretty accurate
 
or
 
9:03 PM
Legacy code is XGH code
 
some code is exempt from documentation if it is self-documenting.
 
No. Legacy code is UGH code.
 
@Mat'sMug Ugly Go Horse?
 
@nhgrif well-named tests are documentation
@BernardMeurer no. Just "ugh".
 
I disagree.
Well-named tests are self-documented tests.
 
9:06 PM
> This is a very complex Axiom, it suggests that a project using XGH is immersed in chaos. Do not try to set order to XGH (See Axiom 16), it's useless and you'll be wasting precious time. This will cause the project to sink even faster (See Axiom 8). Do not try to manage XGH, it is self sufficient (See Axiomm 11), just like chaos.
 
If I pull a library into my code base, I shouldn't have to pull the tests in too just to get the documentation.
 
Legacy code is that
 
They tell you what the thing is supposed to be doing and how
@nhgrif right
 
You guys scared away the PPCG people with all this talk about testing and code quality.
 
What's PPCG?
Private Party Communist Guerrilla?
 
9:08 PM
22 mins ago, by Easterly Irk
@BernardMeurer Programming Puzzles and Code Golf.
 
Tests are a form of documentation, but not, by themselves, acceptable documentation.
 
Didn't even see that message, my bad
 
lol
 
So what's after blog posts for @nhgrif? Should he do talks next?
 
@nhgrif Interview me
 
9:09 PM
Now that I've been writing Swift... I wonder how in the world people writing languages without optionals/nullables survive.
 
Depends of the context. Take Rubberduck's resolver code; documenting it would be replicating 100% of the VBA language's scoping rules, and that would be a waste of time.. and a boring read.
 
possible answer invalidation by wnerb on question by wnerb: codereview.stackexchange.com/posts/123304/revisions
 
Well, @Mat'sMug, I have a different level of criteria for documentation in end-use code versus reusable library code.
 
If you're talking about a framework, then yeah I definitely agree
 
library, framework, whatever
 
9:11 PM
Framework != library
 
Anything that's reusable code.
Including things that are reused throughout your project and not extracted out to a library.
But again, remember, in some cases, if the class & method names are good enough, they're self-documenting.
 
goes to github to write documentation
 
For example...
// Does the thing
func doTheThing()
 
@BernardMeurer Posted that to PPCG. They should have a good laugh
 
9:13 PM
That's not really helpful, is it?
 
@Sherlock9 Gimme PPCG
 
@PinCrash Testing is mandatory, posting explanations is optional, quality is dubious, at best
 
But...
 
in The Whiteboard, 6 mins ago, by iksemyonov
what are the rules for codereview.se.com? namely, if i have 2 related code pieces that can function independently but make little sense to show them separately, can i post both in one question?
you guys might be interested in that :)
 
typical GhostDoc lazybones documentation
 
9:14 PM
// Does the thing.  If circumstance X, Y, or Z arises, the thing is actually not done.  This method fails silently.
func doTheThing()
That's important to be documented.
Of course, the comment format should be in whatever appropriate format that assures it fills out tooltips in appropriate IDEs and can be generated into HTML or PDF documentation packet using whatever appropriate tools.
There's a great Xcode plugin called VVDocumenter that automatically formats my comments with AppleDoc comment style so that I get the IDE pop-ups and can generate an HTML page for my project fully documented. ;)
Haha...
 
9:28 PM
@nhgrif I wonder if they make a tool like that for JavaScript, would be pretty nice
 
Man, you guys really don't vote at all on answers in my tags unless I paste them here, do you?
 
@nhgrif Is that a question or an observation?
 
Observation.
0
A: iOS delegation design pattern

nhgrif func evt_bookModel(bookModel: BookModel, didUpdateCurrentBook book: Book) { var index: Int? for (key, value) in DataStore.defaultInstance.books.enumerate() { if value.id == book.id { index = key break } } if let _ = index { bookVie...

 
0
Q: Am I implementing AbstractExecutionThreadService correctly?

Tony E. StarkI'm pretty new to Guava's Service interface and to Netty in general and I'm trying to use both to implement a simple service which listens to TCP connections and discards packets (for now). This is what I've got so far: public class MyServer extends AbstractExecutionThreadService { private st...

 
9:33 PM
blog post drafts in progress...
 
@nhgrif lmao
 
Good evening all. New to this section of the site.
 
@Avestron Hey there, nice to see you here
 
Welcome, @Avestron :)
 
Home site is Philosophy, eh
 
9:35 PM
Thank you Pin Crash, Dan Pantry, others :c)
 
but more rep at RPG
 
Hm... well I am a bit of a generalist - very green in coding though.
Basic > Pascal > fell off a cliff > starting on C# ;c)
2
 
#00FF00
@Avestron None of this is Swift.
 
Oh I am aware that it will take time. And focus.
Must not forget the focus.
 
I meant...
 
9:37 PM
Must... stay... ... focu... Oh look theres a squirrel!
 
Cool; we don't often get visitors from the non-Technology side of Stack Exchange, we encourage you to look over this short post if you'd like to familiarize yourself:
23
Q: Welcome to The 2nd Monitor!

Pin CrashSo, you have found your way to the Code Review main chat room, The 2nd Monitor, perhaps for one of these reasons: You were invited or "pinged" by a site moderator or other user to discuss a post on the main Code Review site; You visited Code Review for the 1st or Nth time, and noticed the chat ...

 
Hey, do you guys remember the other day when I was talking about how terrible the ! operator is in ? @Mat'sMug, et. al
Look what I just found.
 
I see. First time hearing of Swift.
 
oh crap
 
9:39 PM
there's probably more.
class Client {
    var clientId             : Int!
    var firstName            : String!
    var lastName             : String!
    var email                : String!
    var phone                : String!
    ...

    init() {

    }
}
that ... is scary
 
beautiful
 
Thank you for the link to the welcome and guide!
 
I like how the type specifiers appear to be afraid of the variable name
5
They've run away and built a wall of colons.
 
And the type specifiers paid for it
 
lol.. looks almost like bad VBA indentation
 
9:40 PM
And they've got ! as if they're Metal Gear Solid bad guys.
5
 
I've seen SQL queries like that too... blech
 
yeah, but SQL queries shout at you as well, so they're even scarier
 
or to say "I SAID THAT'S A STRING!"
 
@nhgrif lol, that sound effect :D
 
Without wishing to make a fine point of it - this community already strikes me as being more friendly. I appreciate that and do not intend to spam the chat waves with questions.
 
9:43 PM
user image
4
 
@Avestron As long as you're not being a help vampire I'm sure we'll all happily answer questions.
 
Dan Pantry - Completely understand. I'll keep such to a minimum.
 
@Mat'sMug "I SAID THAT'S A STRING! (but I'll allow you to compile with nil and crash)"
 
@DanPantry Your brain shouldn't touch your keyboard anyway. You got hands for that.
 
slow-clapping...
5
What is this, source code for spies?
Invisible ink code.
3
 
9:46 PM
wow that one deserves an award
 
Surely that's trolling
 
I think he forgot something.
 
-1
Q: How can I detect touch event while UIImageView is moving

Tsutomu OkumuraHere is code. The ImageView is moving top(y=0) to bottom(y=400). Click around y=400, I got a "pressed" but not other places. { }

 
Flagged as UWYA, seemed appropriate.
 
9:47 PM
I used a more specific reason
 
Well, he said he included the code.
I call bullshit, but that's what he says.
It's simply very, very, very broken.
 
I think { } is valid JavaScript
 
@PinCrash It is. It creates an empty object.
 
An anonymous empty object I assume?
 
Don't mind me lurking. One thing that I am finding this part of SE really helpful with is the availability of code to look over and (gradually) learn.
 
9:50 PM
 
Yes.
@nhgrif LOL
 
@Avestron Oh, we got plenty of lurkers.
@nhgrif That clears things up, thanks OP...
 
This question is kind of amazing.
 
Monking
 
Oi
 
9:52 PM
g'day mate
 
HAI
 
Greetings everyone
 
@Mat'sMug to continue the discussion of Jedi Swift...
if let date1 = getValueForKeyFromPersistentStorrage("latestepisode"){
        let Date1 = date1 as! NSDate
Line 2 is called a force cast.
 
love it haha
 
Line 1 is optional binding, the right way to unwrap an optional
The correct way to write this looks like this:
 
9:53 PM
s/write/right/?
 
no...?
think about it.
 
"the write way" is some kind of meme then?
 
oh
I was looking at a different line
if let latestEpisodeDate = getValueForKeyFromPersistentStorrageThisIsATerribleMethodName("latestEpisodeMagicStringShouldBeAConstant") as? NSDate {
Note the as? NSDate
if the method returns anything but an NSDate, the optional binding fails, and we enter the else branch.
 
makes sense
 
lul...
I'm struggling with paste code.. — Tsutomu Okumura 1 min ago
 
9:56 PM
well aren't you
try Ctrl+V
 
quite the understatement
 
Select code, hit Ctrl + C, click edit, hit Ctrl + V. — Mast 36 secs ago
It's not hard.
 
yikes
 
Hey
Mast
Those instructions are...
...
... wrong...
 
lol
 
9:58 PM
If you're on a Mac, probably.
 
 
Select code, hit TAB, Ctrl+C, shift+TAB to restore your indentation, now edit the post, Ctrl+V. that's how I paste my stuff.
 
It's an iOS question, so... yeah...
 
Substitute Ctrl by Command
 
whatever
 
9:59 PM
Select code, hit Ctrl + C, click edit, hit Ctrl + V. If you're on a Mac, substitute Ctrl by . — Mast 2 mins ago
 

« first day (1050 days earlier)      last day (2981 days later) »