• Register
  • TOS
  • Privacy
  • @NeoGAF
  • Like

Koren
Member
(09-20-2017, 07:51 PM)
Koren's Avatar
Why not first list the airports in a 750 miles radius, then check the weather in each of those?
esmith08734
Member
(09-20-2017, 08:04 PM)
esmith08734's Avatar
Anyone want to make a project with me? Or does anyone have some type of free remote work? I just want experience and more chances to improve. I want to be apart of something.
Mike M
Nick N
(09-20-2017, 08:26 PM)
Mike M's Avatar

Originally Posted by Koren

Why not first list the airports in a 750 miles radius, then check the weather in each of those?

That might work...

Derp, I just needed to set a bounding box and adjust the zoom level. Man this has got me rattled.
Datwheezy
Member
(09-20-2017, 09:26 PM)
Datwheezy's Avatar

Originally Posted by Koren

Why not first list the airports in a 750 miles radius, then check the weather in each of those?

This is what I would do as well.
Megasoum
Banned
(09-21-2017, 02:15 AM)
Megasoum's Avatar
So I'm taking Programming 1 in University and today's course was about variable type and my teacher is pronouncing "char" as "Schar" instead of "kar" and this is freaking me out...

Have I been wrong (in my head) for the last 15 years or it is really weird to say it like that?
cpp_is_king
Banned
(09-21-2017, 02:26 AM)
cpp_is_king's Avatar

Originally Posted by Megasoum

So I'm taking Programming 1 in University and today's course was about variable type and my teacher is pronouncing "char" as "Schar" instead of "kar" and this is freaking me out...

Have I been wrong (in my head) for the last 15 years or it is really weird to say it like that?

Uhh, both are wrong? It's char, just like it looks. ch, phonics. cha-ching!

WTF is "schar"? How do you even say that with a straight face?
esmith08734
Member
(09-21-2017, 02:26 AM)
esmith08734's Avatar

Originally Posted by Megasoum

So I'm taking Programming 1 in University and today's course was about variable type and my teacher is pronouncing "char" as "Schar" instead of "kar" and this is freaking me out...

Have I been wrong (in my head) for the last 15 years or it is really weird to say it like that?

I think it’s pronounced char like Charizard.
Megasoum
Banned
(09-21-2017, 02:30 AM)
Megasoum's Avatar

Originally Posted by cpp_is_king

Uhh, both are wrong? It's char, just like it looks. ch, phonics. cha-ching!

WTF is "schar"? How do you even say that with a straight face?

Originally Posted by esmith08734

I think it’s pronounced char like Charizard.

Right, that's what I meant for what she's saying... You just both explained it a lot better than me lol.

Well damn... I guess I was wrong... I always thought of it as the abbreviation of Character.
AALLx
Member
(09-21-2017, 02:33 AM)
AALLx's Avatar
What? Isn't char short for character, and should therefore be pronounced as such?
esmith08734
Member
(09-21-2017, 02:35 AM)
esmith08734's Avatar
Things are heating up!!
Somnid
Member
(09-21-2017, 02:35 AM)
Somnid's Avatar
I accept "char" (how it looks) and "care" (how it would sound if you cut the rest of "character") though generally the former. Special cases: char* (always "char star") and varchar (always "var car") because the alliteration is pleasing.
cpp_is_king
Banned
(09-21-2017, 02:51 AM)
cpp_is_king's Avatar
To be fair, i do hear "car" from time to time. So it's not without precedent.
AALLx
Member
(09-21-2017, 02:55 AM)
AALLx's Avatar
char* > "car pointer"
cha-ching > "ka-ching"
Deuce Deuce
Member
(09-21-2017, 02:57 AM)
Deuce Deuce's Avatar

Originally Posted by esmith08734

Things are heating up!!

Lol

I've always only heard of it as car.

Add a typedef for it in your heads if it doesn't sound correct!
esmith08734
Member
(09-21-2017, 03:09 AM)
esmith08734's Avatar
And for you type-inference folks, we can just pronounce it as ‘var’
cpp_is_king
Banned
(09-21-2017, 03:25 AM)
cpp_is_king's Avatar

Originally Posted by Deuce Deuce

Lol

I've always only heard of it as car.

Add a typedef for it in your heads if it doesn't sound correct!

Careful, you might need to take the 'car' of a list, that won't work if car is also a typedef.

Plus the fact that car already means "first item in a list" is a good reason not to overload the pronunciation
vypek
Member
(09-21-2017, 03:44 AM)

Originally Posted by Somnid

I accept "char" (how it looks) and "care" (how it would sound if you cut the rest of "character") though generally the former. Special cases: char* (always "char star") and varchar (always "var car") because the alliteration is pleasing.

This is pretty much how I feel about it.
Kickz
Member
(09-21-2017, 05:51 AM)
Kickz's Avatar

Originally Posted by vypek

This is pretty much how I feel about it.

Yea kind of the same, I always have heard it sounded as char like Charizard from Pokemon.;)
balgajo
Member
(09-21-2017, 06:37 AM)
balgajo's Avatar
Do you guys use TDD? I work with C++ and Qt on embedded devices and our team never used TDD. We have two Q&A guys that are doing fine, even though our application is getting too big. I feel bad for not using it...
Koren
Member
(09-21-2017, 10:13 AM)
Koren's Avatar

Originally Posted by cpp_is_king

Uhh, both are wrong?

I don't think there's really a "right" here...

Originally Posted by Megasoum

I guess I was wrong... I always thought of it as the abbreviation of Character.

It is...

Originally Posted by AALLx

What? Isn't char short for character, and should therefore be pronounced as such?

That would be my pick.

I'm used to "kar", as the beginning of both the english character and the french caractère. But i've heared "shar" a lot (there's a french word char that pronounces like that, the old antique vehicule behind horses, and I'm pretty sure the word "car" in english come from that) and "tchar" from time to time. To each his own, I guess.
Ryujin
Member
(09-21-2017, 12:57 PM)
Ryujin's Avatar
Sidestepping the whole "char" debate for a moment (I use both "char" (as in Charizard) and "c(h)ar" as in "character" interchangeably).

I'm doing a semester of C this year in college and looking for a decent book, it doesn't have to be a weighty tome with thousands of pages going into the depths of C.

Just something reasonably straight forward (but not a beginner book). Wouldn't mind something that has a bit of depth when it comes to threads, trees and pointers.

Any suggestions?
Deuce Deuce
Member
(09-21-2017, 02:30 PM)
Deuce Deuce's Avatar

Originally Posted by cpp_is_king

Careful, you might need to take the 'car' of a list, that won't work if car is also a typedef.

Plus the fact that car already means "first item in a list" is a good reason not to overload the pronunciation

This sailed right over my head. I've never knew there was a term for first item in a list!
Deuce Deuce
Member
(09-21-2017, 02:31 PM)
Deuce Deuce's Avatar

Originally Posted by balgajo

Do you guys use TDD? I work with C++ and Qt on embedded devices and our team never used TDD. We have two Q&A guys that are doing fine, even though our application is getting too big. I feel bad for not using it...

Technical Design Document?
Mystic Theurge
Member
(09-21-2017, 02:46 PM)
Test Driven Development.

Basically its:

Code:

The QA writes a test and runs it > It fails.
The Dev writes just enough code to cause the test to pass. 
Repeat
It's an attempt to shift the testing process left.
cpp_is_king
Banned
(09-21-2017, 03:18 PM)
cpp_is_king's Avatar

Originally Posted by Mystic Theurge

Test Driven Development.

Basically its:

Code:

The QA writes a test and runs it > It fails.
The Dev writes just enough code to cause the test to pass. 
Repeat
It's an attempt to shift the testing process left.

Not a fan of TDD personally, or anything else that starts from the assumption that a non technical manager or executive knows how to write better software than i do.

That doesn't mean I think it's never true. In some cases management has a different definition of "better" than the engineers, or cannot trust the engineers to deliver on their definition of better. In those cases TDD might make sense, but I would just not work for such a place.
Somnid
Member
(09-21-2017, 05:08 PM)
Somnid's Avatar

Originally Posted by cpp_is_king

Not a fan of TDD personally, or anything else that starts from the assumption that a non technical manager or executive knows how to write better software than i do.

That doesn't mean I think it's never true. In some cases management has a different definition of "better" than the engineers, or cannot trust the engineers to deliver on their definition of better. In those cases TDD might make sense, but I would just not work for such a place.

That's a misunderstanding of TDD. While you can elevate it to a whole project management thing, it would be done so that that there is no mismatched expectations. That is, you would work with the QA/Test Engineer to design a test that encompasses the feature before you sit down to write it. This way it's "done" when the test passes. After all, you can write the world's most beautiful code but if it doesn't solve the business problem it's worthless.

TDD is also applied on a more micro level. I may write a bunch of unit tests and then write my code. The idea is that you have constant verification and aren't just solving the one case in isolation. Also, testable code is almost always better code because it's typically doing less, saving less state and has a more defined functionality and that's just a natural byproduct.

Of course sometimes you don't have enough requirements or you don't have a best approach. It can be harder to do TDD in these cases because you might wind up doing lots of rewrites and refactoring and the tests are just needless overhead. You should always take a look at how much value it adds. Most project's I've worked on are hybrids of some sort.
Lister
Member
(09-21-2017, 05:10 PM)
Lister's Avatar

Originally Posted by cpp_is_king

Not a fan of TDD personally, or anything else that starts from the assumption that a non technical manager or executive knows how to write better software than i do.

That doesn't mean I think it's never true. In some cases management has a different definition of "better" than the engineers, or cannot trust the engineers to deliver on their definition of better. In those cases TDD might make sense, but I would just not work for such a place.

Huh? I've never heard of TDDD described as QA writing the test... how woud that work? The developer writes just enough test to fail, then writes enough code to pass, then nrepeats the process.
Pokemaniac
Member
(09-21-2017, 06:12 PM)
Pokemaniac's Avatar

Originally Posted by balgajo

Do you guys use TDD? I work with C++ and Qt on embedded devices and our team never used TDD. We have two Q&A guys that are doing fine, even though our application is getting too big. I feel bad for not using it...

I find pure TDD to be generally impractical, particularly if you have to deal with a GUI of any sort.

High code coverage should generally be strived for, though.
Ryujin
Member
(09-21-2017, 06:25 PM)
Ryujin's Avatar

Originally Posted by Lister

Huh? I've never heard of TDDD described as QA writing the test... how woud that work? The developer writes just enough test to fail, then writes enough code to pass, then nrepeats the process.

Same for me too, this is how I've always understood it/heard it described.

The notion that QA writes the test and not the dev seems crazy to me.
cpp_is_king
Banned
(09-21-2017, 06:57 PM)
cpp_is_king's Avatar

Originally Posted by Lister

Huh? I've never heard of TDDD described as QA writing the test... how woud that work? The developer writes just enough test to fail, then writes enough code to pass, then nrepeats the process.

FWIW I wasn't implying that either, I think another person said that.

I do think there's some good *ideas* in TDD, but as mentioned, I don't like anything that tries to lay down formal rigid processes for how things should be done, because the world isn't that black and white.

For example, I do think you should always have specific tests *in mind* when you write new code. Because otherwise you will produce code that isn't testable. But the notion that I should write a test against an API that doesn't even exist yet, or that I should go out of my way to write as little code as possible to get the test to pass is silly to me.
Koren
Member
(09-21-2017, 07:45 PM)
Koren's Avatar

Originally Posted by balgajo

Do you guys use TDD?

Strictly talking no.

But I often develop by setting a small additional feature, program it, and repeat.


Though I think the "just enough code" is a bad way to consider it. I mean...

Let's imagine a function "Square"

s(2) = 4

Code:

int s(x) {
    return 4;
}
s(-1) = 1

Code:

int s(x) {
    return 4+(x-2);
}
s(3) = 9

Code:

int s(x) {
    if (x==3) {
        return 9;
    } else {
        return 4+(x-2);
    }
}
etc.

That's caricatural, of course, but when you develop (especially data structure), forward thinking is useful (not too much, you don't want to have a giant class when you won't need it for ages, but still)
Antagon
Member
(09-21-2017, 08:54 PM)
Antagon's Avatar

Originally Posted by Koren

Strictly talking no.

But I often develop by setting a small additional feature, program it, and repeat.


Though I think the "just enough code" is a bad way to consider it. I mean...

Let's imagine a function "Square"

s(2) = 4

Code:

int s(x) {
    return 4;
}
s(-1) = 1

Code:

int s(x) {
    return 4+(x-2);
}
s(3) = 9

Code:

int s(x) {
    if (x==3) {
        return 9;
    } else {
        return 4+(x-2);
    }
}
etc.

That's caricatural, of course, but when you develop (especially data structure), forward thinking is useful (not too much, you don't want to have a giant class when you won't need it for ages, but still)

The problem here is not even that you write 'just enough code', but that you start with the wrong test. aze.. For a square merhod, my first test case would be something like this:

Code:

"s returns the square of x"() {
expect:
s(x) == expected
where:
x   | expected
0   | 0
1   | 1
2   | 4
5     |   25
365 |   13325
46340 | 2147395600
-1    | 1
-40 | 1600
}
The second test would be something like this:

Code:

"s throws an OutOfRangeException when the square of x does not fit in an integer"() {
when:
s(x)
then:
thrown(OutOfRangeException)
where:
x << [46341, -46341, Integer.MAX_VALUE]
}
Now, I don't exactly use TDD religiously, but I have found that it does force me to think better about edge cases, error handling, etc.

Also, refactoring is the third step in the normal TDD proces. And then there's the London or mockist school which takes the whole proces five steps further and adds in defining the boundaries for your 'unit of work' so you can mock them before writing tests. Haven't tried that approach yet, but seems an interesting way to put a lot of focus on the D part of SOLID. But then, it's also way overboard unless you're working on giant enterprise systems.
Mike M
Nick N
(09-21-2017, 09:48 PM)
Mike M's Avatar
Man, I am on like the last hurdle of my project, but it's proving to better than me.

Anyone good with Swift 3 and Core Data? Because I'm having the following problem:

I have a booking object:

Code:

class Booking {
    let departureFlight : Flight
    let returnFlight : Flight
    init(departure: Flight, returning: Flight) {
        self.departureFlight = departure
        self.returnFlight = returning
    }
}
in my .xcdatamodeld, I have the following attributes:

Code:

departureFlight
returnFlight
My first problem: I don't know what to set the Type for these as. I've tried Data and Transformable, and I've also tried doing each property of both the returning and departure flights as their individual data types, but that didn't work either.

Here's the implementation:

Code:

    
var departureFlight : Flight!
var returnFlight : Flight!

func save() {
        guard let delegate = UIApplication.shared.delegate as? AppDelegate else {
            return
        }
        
        let managedContext = delegate.persistentContainer.viewContext
        let entity = NSEntityDescription.entity(forEntityName: "Bookings", in: managedContext)!
        let newBooking = NSManagedObject(entity: entity, insertInto: managedContext)
        
        newBooking.setValue(departureFlight, forKeyPath: "departureFlight")
        newBooking.setValue(returnFlight, forKeyPath: "returnFlight")
        
        do {
            try managedContext.save()
        } catch let error as NSError {
            print("Could not save. \(error.description)")
        }
    }
It's not even getting to the catch statement to throw an error, it crashes with this:

Code:

[error] error:  Failed to load model named Core_Data
CoreData: error:  Failed to load model named Core_Data
2017-09-21 12:34:55.818 SunSeeker[63982:3738274] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'Bookings''
*** First throw call stack:
I'm at my wit's end, I need to have this done by tonight.
Koren
Member
(09-21-2017, 10:05 PM)
Koren's Avatar

Originally Posted by Antagon

The problem here is not even that you write 'just enough code', but that you start with the wrong test. aze.. For a square merhod, my first test case would be something like this:

In this case, I agree, but I was trying to find a simple way to convey the idea that it may be like running in the fog... By being short-sighted, you may have to redo a lot of things.

If large cities subways had been designed by taking a list of "I must go there" places and reach one place at a time by modifying the lines, you would have ended up with a really strange network..

Originally Posted by Antagon

Now, I don't exactly use TDD religiously, but I have found that it does force me to think better about edge cases, error handling, etc.

I'm all for development based on tests, in a lot of cases. I just don't think doing *just* the amount of code to pass the test #i is the best possible thing you can do.

Originally Posted by Antagon

Also, refactoring is the third step in the normal TDD proces.

Indeed, but you may spend much, much more time in refactoring that you would have spend to design the whole project with more insight at the beginning.
cpp_is_king
Banned
(09-21-2017, 10:07 PM)
cpp_is_king's Avatar

Originally Posted by Koren

I'm all for development based on tests, in a lot of cases. I just don't think doing *just* the amount of code to pass the test #i is the best possible thing you can do.

Exactly, this is what I hate about it. Like, I agree it works well if you have a team full of peopel that can't be trusted to make the right judgement calls about what the right amount of work is. But usually you've got at least 1 or 2 senior people who can do code reviews and guide them into reducing complexity.
unknownstranger
Member
(09-22-2017, 12:41 AM)
unknownstranger's Avatar
Hi. I've been taking computer science classes at my community college for a bit over a year. I took an intro to programming class (using Python) in the Spring and just started taking an intro to C++ class. However, I wanted to ask something a little more off topic but didn't know where else to post. I've been taking college classes for years (have my general AA degree) not knowing what I want to do but now I feel like I know what I should work towards. There's a big Microsoft data center about 40 miles from my house and a System Administration degree is a good way to get into it. My current class is one of the last general classes I need towards it before getting into much more specific ones. I was wondering if anyone was working as one and what I should expect from it.
Laevateinn
Member
(09-22-2017, 01:16 AM)
Laevateinn's Avatar

Originally Posted by Mystic Theurge

Test Driven Development.

Basically its:

Code:

The QA writes a test and runs it > It fails.
The Dev writes just enough code to cause the test to pass. 
Repeat
It's an attempt to shift the testing process left.

In my office, someone writes a test, months later someone else is trying to get their code to work but the test fails, the second person comments out the first person's tests. Eventually our tests end up being one test that is impossible to fail.
Mystic Theurge
Member
(09-22-2017, 02:41 AM)
Um....
megarockexe
Member
(09-22-2017, 06:29 AM)
megarockexe's Avatar
This is probably a long shot, but I'm trying to write a tool in C# that extracts patterns from the Photoshop pattern file format. I got the Bubbles pattern out fairly easily. But now I'm stuck on Tie Dye. How am I supposed to work with all these various unknown pixel formats? All I know is it's supposed to be RGB, but the output is all wrong.
Sesuadra
Member
(09-22-2017, 09:19 PM)

Originally Posted by esmith08734

Congratulations. Sounds exciting. Syntax books are kind of a waste, IMO. Everything syntax related is one search away. I would use books to pick up design patterns, methods of refactoring, and things like that.

For Java stuff, codingbat and hacker rank are great resources for problem solving. I used Udemy and YouTube to learn syntax. Tbh, general SQL is easy and can be reviewed in a couple of days, if not shorter. I am not sure how much you'll need to learn, tho.

Just ask questions. Literally no stupid ones. Sometimes it's just hard to explain things so there's a language barrier - not necessarily traditional.

I am learning with you - I am aspiring to be a good Java developer and a useful developer overall so we can leverage each other.

Have fun.

it really is crazy. yesterday I looked into ruby with lrthw and into java.. "hello world" in both done.

but I've to say I'm super nervous. 3 weeks left until class starts. 9 months school and then 15 months internship in a company I've to find myself.

and thanks :D!
Koren
Member
(09-22-2017, 09:29 PM)
Koren's Avatar

Originally Posted by esmith08734

Syntax books are kind of a waste, IMO. Everything syntax related is one search away.

Well, yes and no... If you're looking for a given syntax, yes, you'll find it online.

But ressources about syntax can suggest you syntaxes you would never have thought existed, thus never look for. You often find those in advanced books too, though. But I still find interesting sometimes to look at ressources specifically on syntax. Hell, I sometimes directly read the raw grammar of a language...

Also, a good ressource on syntax can present you everything in a clear, systematic manner, which can be useful sometimes.

That being said, I talk about ressources, not necessarily books (though I like to have some reference in my e-reader, so websites I can't download aren't always the most useful thing).
esmith08734
Member
(09-22-2017, 10:34 PM)
esmith08734's Avatar

Originally Posted by Sesuadra

it really is crazy. yesterday I looked into ruby with lrthw and into java.. "hello world" in both done.

but I've to say I'm super nervous. 3 weeks left until class starts. 9 months school and then 15 months internship in a company I've to find myself.

and thanks :D!

If you want to start a project together, let me know.

I really want to a collaborative project with people. Like, work for free, all that.
cpp_is_king
Banned
(09-22-2017, 11:01 PM)
cpp_is_king's Avatar

Originally Posted by esmith08734

If you want to start a project together, let me know.

I really want to a collaborative project with people. Like, work for free, all that.

Have you tried looking at various open source projects?
esmith08734
Member
(09-22-2017, 11:40 PM)
esmith08734's Avatar

Originally Posted by cpp_is_king

Have you tried looking at various open source projects?

Do you happen to have links? I heard of this but never knew how to really get started.
Lister
Member
(09-23-2017, 02:27 AM)
Lister's Avatar

Originally Posted by esmith08734

Do you happen to have links? I heard of this but never knew how to really get started.

You can troll github and see if something strikes your fancy.

Some of us are helping SuperEpicMan with a website idea he had.
esmith08734
Member
(09-23-2017, 05:13 AM)
esmith08734's Avatar

Originally Posted by Lister

You can troll github and see if something strikes your fancy.

Some of us are helping SuperEpicMan with a website idea he had.


Do you have details?
cpp_is_king
Banned
(09-23-2017, 06:24 AM)
cpp_is_king's Avatar

Originally Posted by esmith08734

Do you happen to have links? I heard of this but never knew how to really get started.

Hmm, just google for popular open source projects? LLVM, Git, Swift, Python, Subversion, Chromium are all open source projects.

Probably helps to start by picking a language / technology stack you want to learn, as well as a domain you’re interested in (compilers, video, etc)
Sectorseven
Member
(09-23-2017, 03:47 PM)
Sectorseven's Avatar
Does anyone have familiarity with software testing certification, like ISTQB?

Is this something taken seriously by employers and is it worth pursuing?
ricki42
Member
(09-23-2017, 05:15 PM)
ricki42's Avatar

Originally Posted by esmith08734

Do you happen to have links? I heard of this but never knew how to really get started.

If you're interested in game development, there are also a lot of open-source projects looking for contributors. For example 0 AD. Their engine is c++, the scripting JavaScript. I just skimmed their website, and they have a list of beginner tickets.
There are a lot of other opensource game projects, this is just the first that came to mind because it's fairly big. SuperTuxKart is another, also has a - rather short - list of beginner tasks.
CarbonatedFalcon
Member
(09-24-2017, 03:26 AM)
CarbonatedFalcon's Avatar
Anybody here have experience programming Discord bots?

I don't have much programming knowledge (yet!), but I think a (relatively simple) Discord bot is a small enough project that I think I could accomplish in a reasonable amount of time.

Mainly my project goal would be to do a bot (or several) that relate to EVE Online, enabling functions such as posting killboard data, or synchronizing server roles with in-game character permissions (corp/guild management), and/or posting official update news/patch notes, to name a few examples.

If you can, tell me what sort of things I'd need to know, and potentially crush (or enable!) my dreams on this.

Thread Tools