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

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

what sort of program do you have to be capable of writing by yourself?

a program

FizzBuzz.

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

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

i made a typo, if you can find it then that probably also makes you a "good" programmer

>%

Not even print the number as the default case?

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.

def isPrime(n):
if n

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.

He never said the "fizz" and the "buzz" should be on the same line.

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.

That's hacker tier.

"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.

you made a typo in pseudocode?

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 IO (Maybe a)
getArg = do
arg:_ 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

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

Modulus?

Superb Marios?

>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

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.

>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.

the missing && isn't the only mistake. this will never actually print the word "fizzbuzz".

You are trying too hard. If you skipped the last point I would've bitten that one.

CRM? What's that?

When you've done all this

You can call even a newbie a programmer however that does not reflect on skill.

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.

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.

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.

you don't even need to be a tech person to do that

this You have to test the fizzbuzz before the individual fizz and buzz.