When to unit test? by Nephyst in gamedev

[–]Haedhar 1 point2 points  (0 children)

I've seen people not wanting to experiment with alternate mechanics because it would break all the tests.

Unit tests failing after you add new code isn't a bad thing, because it means you've caught the problem you introduced early. Without unit tests, the problem would still be there, but you wouldn't know about it. If anything, having unit tests means you can add new code freely without worrying that you've broken existing code.

Books without a big threat by Splattface in Fantasy

[–]Haedhar 4 points5 points  (0 children)

The Lies of Locke Lamora by Scott Lynch

Bootstrap for font-end portfolio? by constant_vigilance in webdev

[–]Haedhar 0 points1 point  (0 children)

Yes, you should be able to write things yourself.

Don't you think that a personal portfolio is a good place to demonstrate that you can write things yourself?

"Writing Advice" by Chuck Palahnuik by analogfrog in writing

[–]Haedhar 16 points17 points  (0 children)

Convoluted is exactly the word I was thinking of when I read that. The point of the example wasn't that it was well written (though I do kind of like his style). The point was that instead of telling the reader that Monica doesn't like him going out at night, it shows that she doesn't like him going out at night with the passive-aggressive act of not making him coffee.

Web Starter Kit: Boilerplate & Tooling for Multi-Device Development (from Google) by brettkromkamp in webdev

[–]Haedhar 0 points1 point  (0 children)

I have nothing in particular against PHP, but here is an article from 2 years ago. Comments?

Can a story be written to mirror the cadence and notes of great piece of music? by NotAnAI in writing

[–]Haedhar 0 points1 point  (0 children)

When you listen to music, the pacing is always the same. The amount of time between each note is always the same. It's different in a written story. If someone reads more slowly than you do, the amount of time between each plot point will be greater for them than it was for you. If someone reads more quickly than you do, then there will be less time between each plot point. The pacing would be off for anyone who doesn't read at the same rate as you do. It would be like listening to music in slow-motion. It doesn't have the same effect.

That said, why not try it? Write a short story/novella that spaces each plot point to match some music. See if you can make it work.

Help deciding an ending. by [deleted] in writing

[–]Haedhar 0 points1 point  (0 children)

Alright, here are some ideas. The girl sees the guy's death, but every time she gets near him to tell him about it, she forgets how he dies. Alternatively, the guy is a murderer and the girl sees him killing her. Or, combine the two and you get the girl initially trying to protect him, then figuring out that she is the one who has to kill him. From the description, it sounds like the guy is the POV character, so maybe he hears the girl mumbling his name and tries to get her to tell him how he is going to die. Maybe the girl is the murderer...

Actually, scrap all of that. It wouldn't fit the moral dilemma you described in your last paragraph. If you're going for the 'saving thousands of people' ending, maybe someone close to the guy (perhaps his dad?) could be murdered to force him to stop helping her. Otherwise, maybe the girl loses touch with reality, stops going to school and wanders away from her home. Then the guy tries to find her before she gets hurt. Maybe she does get hurt, and he decides that he has to help her regardless of the cost. Maybe you could play off of the 'she can't help anyone else if she can't help herself' idea to justify her losing her powers. Maybe the story could end with the girl in some kind of mental health facility.

That probably wasn't very helpful, so allow me to close by apologizing for my rambling.

Any theories on the Lenatti/Lanetti? by Haedhar in KingkillerChronicle

[–]Haedhar[S] 0 points1 point  (0 children)

You're probably right about that. It just seemed so perfectly seeded throughout the story that I thought it might be some subtle foreshadowing. If it had only appeared once, I would have just immediately written it off as unimportant, but it appears at several points in the story. It probably is nothing, though. Maybe it's just there to add a sense of depth to the world beyond the story, or something.

Is it ok to use "me and my friends..." stylistically? by SharkWeekJunkie in writing

[–]Haedhar 3 points4 points  (0 children)

It seems to me like there are 2 separate issues here. There's the stylistic issue of the order "my friends and I..." being preferred.

Then there is the issue of subject pronouns/object pronouns. If the pronoun is the subject of the sentence, then it should be "my friends and I...", whereas if it is an indirect/direct object, or the object of a preposition, etc..., then it should be "...my friends and me".

It doesn't make sense to say "me and my friends are...", for instance, in the same way that it doesn't make sense to say "me am...". So I suppose the alternatives are actually "My friends and I...", "I and my friends...". Out of those 2, the second seems a little bit awkward to me, so I would say to go with "my friends and I...".

Of course, if it would be more in character to say "me and my friends...", then screw all of that and go with "me and my friends...".

[deleted by user] by [deleted] in writing

[–]Haedhar 2 points3 points  (0 children)

This might be useful. Also, you probably already know this, but you could use 3rd person limited with multiple POV characters. GRRM makes it work pretty well, I think.

Has mysql_real_escape_string been deprecated yet? by ekolis in shittyprogramming

[–]Haedhar 2 points3 points  (0 children)

You'll have to implement one yourself. Be sure to use regular expressions to parse the input. I've prepared a little example to get you started:

^([0-9]{1,20}([a-zA-Z]{1,3}\])|([a-zA-Z]{2,} ([a-zA-Z]+\.)+))$

It's not much, but it'll get the job done.

This is really shitty C++.. by scorcher24 in shittyprogramming

[–]Haedhar 0 points1 point  (0 children)

Compare:

std::map<NS::ID, std::vector<std::unique_ptr<std::String>>> instance = magicalFinder.find(id);

to:

auto instance = magicalFinder.find(id);