[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

at what point can you call yourself a "programmer"?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 42
Thread images: 5

File: Fear.jpg (147KB, 626x443px) Image search: [Google]
Fear.jpg
147KB, 626x443px
at what point can you call yourself a "programmer"?

what sort of program do you have to be capable of writing by yourself?
>>
>>62334030
a program
>>
FizzBuzz.
>>
>>62334030
Hello World
>>
Go through the numbers 1 to 1000000000 adding the prime numbers as you go
If the number is divisible by 3 print fizz
If divisible by 5 print buzz
If prime print current prime number sum
>>
sell a Vulkan engine
>>
File: edumacation.jpg (235KB, 1280x720px) Image search: [Google]
edumacation.jpg
235KB, 1280x720px
shockingly, apparently the majority of applicants to programming jobs are either unable to solve fizzbuzz, or have low-grade solutions. so if your solution is better than:


if number % 3 == 0:
print "fizz"
else if number % 5 == 0:
print "buzz"
else if number % 3 == 0 % number % 5 == 0:
print "fizzbuzz"
else:
print number



then you are apparently a "good" programmer
>>
>>62334581

i made a typo, if you can find it then that probably also makes you a "good" programmer
>>
>>62334581
>>62334626
>%
>>
>>62334218
Not even print the number as the default case?
>>
>>62334030
When you can find syntax errors without a compiler.

Programmer is a broad term that doesn't mean anything, developer or engineer is a much better term.
>>
>>62334218
def isPrime(n):
if n<2:
return 0
if (n%2==0):
return 0
for i in range(3,int(n**0.5)+1,2):
if n%i==0:
return 0
return 1
limit = int(input())
sumofprimes = 0
for k in range(1,limit+1):
s = ''
if k%3==0:
s = s + "Fizz"
if k%5==0:
s = s + "Buzz"
print(s)
if(isPrime(k)):
sumofprimes = sumofprimes + k
print(sumofprimes)
>>
>>62334581
Pleb non-programmer who did a bit of programming/scripting before. What is wrong with this solution (ignoring the typo)? Is it too many loops? How could you optimize this algorithm?

Asking honestly, that's the solution I'd come up with, but I'm curious how would I need to change my thinking/logic to improve it, and what would actually be considered an improvement. Thanks.
>>
When you realise your companies sales organisation can go fuck themselves.
>>
>>62334698
He never said the "fizz" and the "buzz" should be on the same line.
>>
File: base10.png (16KB, 297x255px) Image search: [Google]
base10.png
16KB, 297x255px
>>62334746

i will give you a hint. the follow question usually asked is "now, how would you modify the problem so that the same conditions (divisible by 3 = "fizz", divisible by 5 = "buzz") are satisfied, but now, numbers divisible by 7 have to also add "bang" to it.

examples:

21 (3*7) should print "fizzbang"
25 (5*7) should print "buzzbang"
105 (3*5*7) should print "fizzbuzzbang"

think about what would happen if you would add a fourth factor. you will notice that simply following the same formula, your program will start ballooning out of control as the amount of case combinations rises exponentially.

there are more elegant ways to solve this that are much more scalable.
>>
I don't know if people are memeing or not
you can actually get a job in programming only knowing the mere basics? I thought I had to at least write a calculator or a text editor.
>>
>>62334209
That's hacker tier.
>>
>>62334030
"Programmer" only specifies what kind of things you do, it doesn't specify how well you do. You could be a beginner programmer or an advanced programmer. I consider a mediocre programmer to be able to write a simple interactive program, like chess game with a stupid bot.
>>
>>62334626
you made a typo in pseudocode?
>>
>>62334881
I spent much too much time on this.
{-# LANGUAGE ScopedTypeVariables #-}
import System.Environment
import Text.Read

-- more general: userValue :: Read a => IO () -> IO a
userValue :: Read a => String -> IO a
userValue msg = do
str <- getLine
maybe
(do putStrLn msg
userValue msg)
pure
(readMaybe str {-:: Maybe a-})

getInt :: IO Int
getInt = userValue "Please input an integer"


getArg :: Read a => IO (Maybe a)
getArg = do
arg:_ <- System.Environment.getArgs
return . readMaybe $ arg


-- this probably could be optimized
concatMaybe :: [Maybe String] -> Maybe String
concatMaybe (Just s : xs) =
maybe
(Just s)
(Just . (s++))
(concatMaybe xs)
concatMaybe (Nothing : xs) = concatMaybe xs
concatMaybe [] = Nothing

-- is there a defined function for this?
maybePack :: Bool -> b -> Maybe b
maybePack c v = if c then Just v else Nothing

fizzerbuzzer :: [Int -> Maybe String] -> (Int -> String) -> Int -> String
fizzerbuzzer options def n =
maybe
(def n)
id
(concatMaybe ((\f -> f n) <$> options))

fizzbuzz :: Int -> String
fizzbuzz = fizzerbuzzer (map (\(y, s) x -> maybePack (mod x y == 0) s)
[(3, "fizz"), (5, "buzz")])
show


main :: IO ()
main = do
-- this looks ugly, I probably learn to monad transformers
mn :: Maybe Int <- getArg
n <- maybe getInt return mn
mapM_ (putStrLn . fizzbuzz) [1..n]
>>
>>62335960
He wrote % instead of &
>>
When you can get hired in a programming job. Things that will make me want to immediately tell you to go fuck yourself:
>Only knowing javascript
>Not knowing anything about algorithms and data structures
>Not recognizing haskell as the ultimate superior language
>>
>>62334642
Modulus?
>>
Superb Marios?
>>
>>62337050
>haskell
>statically typed
>ghc is ridiculously bloated
>hideous sytax that tries too hard to look like mathematical notation instead of using superior s-expressions
>functional meme means it has to use monads for basic things
>>
>>62337050

I vaguely know what big O notation looks like. No idea what any of it actually means. But they pay me a lot of money to write code. I figure as long as I can keep fooling people into thinking I'm a programmer, then I'm a programmer.
>>
You either have to make money or eliminate jobs. Personally eliminated at least 50 shitty jobs so far due to the various CRMs I've made.
>>
>>62337508
>I vaguely know what big O notation looks like.
O(complexity)
A typical example would be a sorting algorithm.
Sorting an array of entries obviously takes more time with more entries.
O(n^2) would mean a double for loop going over all entries for every entry.
It says nothing about how much time you spend on each iteration.
Usually, you want to create as low a complexity as possible.
But it is not always just comparing the complexity of known algorithms.
Eg, bucket sort is O(n), but uses so much memory it is rarely used.
>>
>>62334581
the missing && isn't the only mistake. this will never actually print the word "fizzbuzz".
>>
>>62337476
You are trying too hard. If you skipped the last point I would've bitten that one.
>>
>>62337745
CRM? What's that?
>>
File: triangle.png (61KB, 598x479px) Image search: [Google]
triangle.png
61KB, 598x479px
When you've done all this
>>
File: programmer.png (70KB, 2024x1432px) Image search: [Google]
programmer.png
70KB, 2024x1432px
>>62334030

You can call even a newbie a programmer however that does not reflect on skill.
>>
>>62334689
Anybody can find syntax errors. In fact thats obvious. If you read through any programming manual, any language; the keywords are defined therein. You cannot use keywords as names of variables.

If software isn't compiling, that's the first thing people check, is making sure that syntax is correct. Semi colons are in place, brackets, etc.

Its semantics, how you are describing the problem, and how a compiler interprets it.
>>
>>62334120
FizzBuzz but you're not allowed to use the "standard" functions (ie. No printf, no atoi or itoa etc.)
>>
when your program has more than 100 users and there are regular updates / patch for at least 6 months
otherwise you're just a scriptkiddie that piece shit together and as long it werks on your machine, you just leave it be and don't do patches so it werks on other people's machine
>>
I'd say when you satisfy a business need, automate something, etc.
>>
You're a real programmer when you've

A) Crashed production
B) Fixed your blunder
C) Didn't lose your job/business over it

At that point, you realize that they realize you're pretty damn good, even if you do cock it up on occasion.
>>
>>62334030
You keep making this thread and I keep telling you: This is a retarded question. You have to be able to make basically anything given enough time, and this capability comes from understanding engineering principles and having an aptitude for problem solving. The former can be learned, the latter seems to be a "you have it, or you don't" kind of deal.
>>
>>62341807
you don't even need to be a tech person to do that
>>
>>62334581
this >>62338227

You have to test the fizzbuzz before the individual fizz and buzz.
Thread posts: 42
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.