Why not first list the airports in a 750 miles radius, then check the weather in each of those?
Why not first list the airports in a 750 miles radius, then check the weather in each of those?
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?
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?
I think its pronounced char like Charizard.
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!
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.
I don't think there's really a "right" here...Uhh, both are wrong?
It is...I guess I was wrong... I always thought of it as the abbreviation of Character.
That would be my pick.What? Isn't char short for character, and should therefore be pronounced as such?
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
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...
The QA writes a test and runs it > It fails.
The Dev writes just enough code to cause the test to pass.
Repeat
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.
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.
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...
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.
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.
Strictly talking no.Do you guys use TDD?
int s(x) {
return 4;
}
int s(x) {
return 4+(x-2);
}
int s(x) {
if (x==3) {
return 9;
} else {
return 4+(x-2);
}
}
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)
"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
}
"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]
}
class Booking {
let departureFlight : Flight
let returnFlight : Flight
init(departure: Flight, returning: Flight) {
self.departureFlight = departure
self.returnFlight = returning
}
}
departureFlight
returnFlight
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)")
}
}
[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:
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.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:
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.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.
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.Also, refactoring is the third step in the normal TDD proces.
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.
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.
it really is crazy. yesterday I looked into ruby with lrthw and into java.. "hello world" in both done.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.
Well, yes and no... If you're looking for a given syntax, yes, you'll find it online.Syntax books are kind of a waste, IMO. Everything syntax related is one search away.
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 !
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?
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.
Do you happen to have links? I heard of this but never knew how to really get started.
Do you happen to have links? I heard of this but never knew how to really get started.