|
Symbolic Butt posted:something like this I guess thank u v much Jabor posted:you should post something that you've tried but isn't working - it's way more instructive to point out where your existing approach went wrong than it is to just give a solution (or a process to derive a solution) from nothing. its difficult to explain but there is not much to paste that i have tried that isnt a big mess (also i deleted it all lol) my problems are all with the syntax & i can read it but not write it
|
# ? Jan 19, 2015 11:50 |
|
|
# ? May 13, 2024 07:47 |
St Evan Echoes posted:no because the variable is initialised as 0 so it would return 0 *opens turbo pascal*
|
|
# ? Jan 19, 2015 11:52 |
|
theadder posted:its swift ta Hmm, Swift syntax turns out to be a mix between JavaScript and Python lol
|
# ? Jan 19, 2015 11:59 |
|
lmao i didn't even realise it was an actual language, I thought it was pseudocode from a textbook or smth edit i was still right because swift isn't a real language
|
# ? Jan 19, 2015 12:01 |
|
i kinda like swift i guess this is the thread for me then, heh.
|
# ? Jan 19, 2015 12:30 |
|
thx all were makin serious progress now (to page 19)
|
# ? Jan 19, 2015 12:39 |
|
I'm looking for a video that demonstrates the kind of speed increase you would be looking at with a good implementation of multi threading for an appropriate task. Does anyone have any suggestions? Or even something simple I could code myself, I can't think of something simple but informative
|
# ? Jan 19, 2015 13:19 |
|
depends heavily on the appropriate task, mate. for example, i've gotten extremely trivial 10x speedups on mass download scripts using multithreading. are you actually interested in parallelism or in concurrency?
|
# ? Jan 19, 2015 13:27 |
is dvorak/colemak something to look into or not
|
|
# ? Jan 19, 2015 14:25 |
|
kalstrams posted:is dvorak/colemak something to look into or not nooo
|
# ? Jan 19, 2015 14:28 |
|
one time i got drunk and then decided to learn dvorak and spent 2 hours trying to touch type in dvorak with my eyes closed. when i sobered up i no longer had an interest in dvorak
|
# ? Jan 19, 2015 14:47 |
|
so what does a good oo tutorial look like, if not "car extends vehicle"
|
# ? Jan 19, 2015 14:48 |
|
is this a trick question? oo is bad
|
# ? Jan 19, 2015 14:49 |
|
qntm posted:so what does a good oo tutorial look like, if not "car extends vehicle" square extends rectangle, duh
|
# ? Jan 19, 2015 14:57 |
fart simpson posted:is this a trick question? oo is bad thanks university education, in tyool 2015 i know pascal and think oop is what i should do next
|
|
# ? Jan 19, 2015 15:04 |
|
Symbolic Butt posted:now what if your interestingNumbers contain only negative numbers? :iamafag: Then number kinds like 'primes' (by the usual definition), 'squares' and 'Fibonacci' kind of don't belong in the exercise anymore in the first place
|
# ? Jan 19, 2015 15:26 |
|
find the smallest least interesting number
|
# ? Jan 19, 2015 17:14 |
|
four
|
# ? Jan 19, 2015 17:15 |
|
wait, no, twelve
|
# ? Jan 19, 2015 17:16 |
|
twelve is the smallest uninteresting number. it's composite. it isn't an interesting power. its factors are interesting numbers on their own, but also factors of almost every number. twelve is the smallest uninteresting number.
|
# ? Jan 19, 2015 17:17 |
|
Bloody posted:wait, no, twelve Nah it's 14
|
# ? Jan 19, 2015 17:17 |
there isn't an objective definition to what constitutes an interesting number
|
|
# ? Jan 19, 2015 17:18 |
|
one is obviously interesting & lonely. two is neat - it is the only even prime number! three is the first odd prime number, so that's nifty. four seems like a good candidate for boringness, but it's the first square, so that's right out. five is prime, but not too interesting of a prime. it has some potential. being halfway to ten, a interesting number in the common base-10 scheme, though, is somewhat interesting. six is the first number composed of 2 and 3, but is also the first perfect number, which saves it from boredom. 7 is a lucky number 8 is the first cube 9 is the first square of 3 which is getting to be a stretch for interestingness 10 is the first two-digit number! it's entire existence explains base-10 number representations. extremely important number. 11 is the first double-digit prime, and also two '1's in a row, and 1 is so interesting that 11 gets some of this by association.
|
# ? Jan 19, 2015 17:19 |
|
twelve, however, is not interesting.
|
# ? Jan 19, 2015 17:20 |
|
wolffenstein posted:what up thread its been a long while since i last posted in here. last time i shitposted about webdna, a lovely relic of a language no one's heard of. well after quitting that job without lining up another one first, i had a severe existential crisis and pretty close to committing suicide. a cross country move and several lovely months later, i am gainfully employed at a php dev shop. also i take sad brain medication and see a counselor so i don't repeat what i did. yet i still seem easily susceptible to giving a drat about doing my job right. professional detachment takes time especially if you got the job from hobbying programming quote:so this dev shop was like three people for the longest time, then in the past year they hired on like crazy to try and keep up with the work coming in. well considering my last job was just my boss and i with no prospect for growth, this is already a step up. they use svn, which is better than no vcs so yay another step up. yeah that sounds similar. the trick is usually small victories: aim for small improvements that are easy to sell to the rest of the team. work on some of the more stubborn people or those most likely to help or hinder improvements. you might find that it is easier to sell them on docker or heroku or digitalocean or whatever to manage your release/deploys quote:i guess i should jump ship but given my troublesome employment history, i think its best to stick it out for at least a year before moving. or finding a less sad brains-inducing career. i just wanna be like tef. thanks for reading. well you've got the history of mental health issues so you're on track
|
# ? Jan 19, 2015 17:24 |
|
twelve is cool because if you have twelve of something you can divide it amongst 2, 3, 4, _or_ 6 people. i feel sad if i have 12 things and i need them to divide amongst five.
|
# ? Jan 19, 2015 17:24 |
|
Bloody posted:one is obviously interesting & lonely. three, is an odd prime number, yes it is
|
# ? Jan 19, 2015 17:25 |
|
twelve is the lowest number that has more than three factors (not including 1 and itself) which is kinda interesting
|
# ? Jan 19, 2015 17:27 |
|
-42
|
# ? Jan 19, 2015 17:30 |
|
the smallest uninteresting number is currently 14228 and no, the fact that 14228 is the smallest uninteresting number does not make it interesting
|
# ? Jan 19, 2015 17:44 |
|
Careful Drums posted:twelve is cool because if you have twelve of something you can divide it amongst 2, 3, 4, _or_ 6 people. i feel sad if i have 12 things and i need them to divide amongst five. i can divide ten things among any of those numbers of people.
|
# ? Jan 19, 2015 17:47 |
|
i reject the company of others to solve all these problems
|
# ? Jan 19, 2015 17:48 |
|
2 is the only even prime number? 2 is the only prime number evenly divisible by 2?? you don't say did you know that 3 is the only prime number evenly divisible by 3 and 5 is the only prime number evenly divisible by 5
|
# ? Jan 19, 2015 17:48 |
|
1, 2, 4, 8, 15
|
# ? Jan 19, 2015 17:50 |
|
How to understand pointers: If you do something and get a compiler error, just start adding "*" or "&" to stuff until the error goes away.
|
# ? Jan 19, 2015 18:17 |
|
MononcQc posted:The quickcheck library wouldn't be much help unless you can figure out a property of your IO system you want to see, or find an alternative function (a model) to compare your implementation to. quickcheck doesn't help with the DI part of it, but you can still quickcheck IO/stateful stuff like mad, it just takes a bit more work. You have to build a simple little state machine simulator, and randomly generate a list of actions to perform, and then verify the simulator and the real thing give the same results at every step. Possibly also checking invariants on the real thing at each step. It's pretty awesome actually. I saw Hughes give a talk about quickchecking a database implementation and finding concurrency bugs. He did this cool live demo showing a quickcheck finding a concurrency bug that was open on some erlang db for months or years or something that nobody was able to reliably reproduce until he whipped his thing up. It was awesome. DI stuff is slightly overused, imo. It's useful for unit testing business logic, and not much else. The special thing about business logic is that usually there's a crapton of state you have to set up like a rube goldberg machine to test the particular path you're interested in, and then it's better to just fake it than try to create that fragile mess. For the most part, I think actually just running the real thing is underrated, though I understand some databases (and other external services) can make it really difficult to do so. qntm posted:so what does a good oo tutorial look like, if not "car extends vehicle" I have never seen a good OO tutorial. Inheritance is a really problematic feature, and every OO tutorial goes on about it from the start like it's important and what you should be doing all the time. Basically, the best OO code rarely uses inheritance and only uses interfaces, so they're instructing you on how to be a bad coder from the start. Basically, fine read whatever, but there's a wikipedia article that describe I think the "circle ellipse problem" or something, which you should read and understand what's wrong. Though do not attempt to learn how to solve it from wikipedia, just understand what the problem is. The solution is to not loving use inheritance. Whatever commonality you actually need between a circle and an ellipse, just abstract out as an interface, and otherwise leave no relationship between them at all. idk, I haven't read all the pages, has someone answered this before better than I have?
|
# ? Jan 19, 2015 18:29 |
|
crazypenguin posted:quickcheck doesn't help with the DI part of it, but you can still quickcheck IO/stateful stuff like mad, it just takes a bit more work. You have to build a simple little state machine simulator, and randomly generate a list of actions to perform, and then verify the simulator and the real thing give the same results at every step. Possibly also checking invariants on the real thing at each step. It's pretty awesome actually. unironically would like to subscribe to your possibly-existent newsletter for reason of this quality post
|
# ? Jan 19, 2015 18:42 |
|
it's a recurring post. inheritance is mixing up your utility code with your interface with your delegates and to boot it totally messed with your access hierarchy and it means you have to jump across multiple files to understand how anything works. inheritance in most cases is the wrong thing to do, which is annoying because it's the first thing that's taught in most oop courses. if you discussed literally anything else it wouldn't be nearly as bad imo.
|
# ? Jan 19, 2015 18:44 |
|
tef posted:yeah that sounds similar. the trick is usually small victories: aim for small improvements that are easy to sell to the rest of the team. work on some of the more stubborn people or those most likely to help or hinder improvements. you might find that it is easier to sell them on docker or heroku or digitalocean or whatever to manage your release/deploys also i feel like using a vagrant vm for dev is a very small improvement compared to the larger picture, so i don't know where else i can start. maybe creating a svn branch? it also doesn't help that as a dev shop, we have multiple clients so it feels like any work i do can only apply to one and only one client's environment thanks to technical choices made at start of client's relationship. all production sites sit on the same server and use the same database instance, separated by hosts and logins stored in committed config files. I'm p sure web dev best practices say put production sites on individual servers which feels right to me, but to convince my team "hey great the production sites all work fine on the production server but this only multiplies how many sites are affected by a server issue or human error" seems like already a lost cause because we got enough poo poo to do already. quote:well you've got the history of mental health issues so you're on track
|
# ? Jan 19, 2015 18:54 |
|
|
# ? May 13, 2024 07:47 |
|
inheritance is bad. just use mixins
|
# ? Jan 19, 2015 19:14 |