Cs degree meme

>doing code reviews
>asked guy to implement a series of 4 buttons that had the current searched month, previous month and the next two months
>he comes up with this (javascript)
vm.mapMonths = [
{key:"gennaio", value:"01"}, {key:"febbraio", value:"02"}, {key:"marzo", value:"03"}, {key:"aprile", value:"04"}, {key:"maggio", value:"05"}, {key:"giugno", value:"06"},
{key:"luglio", value:"07"}, {key:"agosto", value:"08"}, {key:"settembre", value:"09"}, {key:"ottobre", value:"10"}, {key:"novembre", value:"11"}, {key:"dicembre", value:"12"}
];
monthPrev = moment(dateFromCopy).subtract(1, 'M').format('DD MMMM YYYY');
keyMonthPrev = monthPrev.substring(3, monthPrev.length);
valueMonthPrev = monthPrev.substring(3, monthPrev.length - 5);
monthCurrent = moment(dateFromCopy).format('DD MMMM YYYY');
keyMonthCurrent = monthCurrent.substring(3, monthCurrent.length);
valueMonthCurrent = monthCurrent.substring(3, monthCurrent.length - 5);
monthNext = moment(dateFromCopy).add(1, 'M').format('DD MMMM YYYY');
keyMonthNext = monthNext.substring(3, monthNext.length);
valueMonthNext = monthNext.substring(3, monthNext.length - 5);
monthNextNext = moment(dateFromCopy).add(2, 'M').format('DD MMMM YYYY');
keyMontNextNext = monthNextNext.substring(3, monthNextNext.length);
valueMonthNextNext = monthNextNext.substring(3, monthNextNext.length - 5);

vm.months = [
{key:keyMonthPrev, value:valueMonthPrev}, {key:keyMonthCurrent, value:valueMonthCurrent}, {key:keyMonthNext, value:valueMonthNext},
{key:keyMontNextNext, value:valueMonthNextNext}
];

This is probably getting him put in helpdesk. Any of you want to share some coding fails

Attached: file.png (480x270, 33K)

Pasta pizza mafia

Kek Almeno ha scritto qualcosa

Why are non-americans so bad at programming?

>ask a guy to write javascript
>he's a bad at it
Ohhh

Major in CIS, user. Don't fall for the CompSci meme.

>moment(dateFromCopy).subtract(1, 'M').format('DD MMMM YYYY');
Why?

Can you show the correct code?

he could have just stored them as three variables instead of 12 by just grabbing the kval pairs.....

>valueMonthNextNext
What... what was the question even?

my boss routinely makes sql tables to map key value pairs... 16 years work experience.

What does that have to do with CS degree? You gave him an impossible task that has no basis in reality. No project will ever need that kind of buttons.

>>he's a bad at it
OK Mario let's see you do better

Attached: 1560420066402.png (612x420, 223K)

It's fucking javascript. I don't know it and I don't even wanna learn it.

It's fucking SQL. He's stuck with his job and he's refusing to actually learn that shit.

could be worse

Attached: wiped the db.png (1229x784, 191K)

Has to be fake

Seems pretty big vulnerability in the database. So while the new guy did fuck up, the responsibility ultimately is on whoever was retarded enough to build a system like that.

>no backups
>junior dev gets write access to production db
Even undergrads wouldn't fuck up this bad.

Attached: 1562609771069.jpg (262x228, 17K)

That's a very interesting way to do that? Why not just store the months in an array? Why create an array of json objects where the value is obviously the index + 1? And wtf is with the other 20 lines?

Jesus Christ, wtf is this?

javascript is not computer science

Eh, if he's a new employee show him a proper implementation and see if he's a quick learner.
I've seen new hires go from shit to decent in a few weeks.

This is true. My boss hired people this way. He'd give people some mini project or task and come back 3-5 days later and let them explain what they've done. If they could explain how they've completed their task, what materials they read online, and give a coherent explanation of the workings of the technology, they'd get the job. The brainlets would come back with some copy paste tutorial answer and would get the boot.

>webshit
>be surprised when it's shit
big revelation

Why have JS do it at all. Can't you just send it to php and drop from the db.

i dont get what this is supposed to be

So? Are there tables that have matching keys? That is called a RELATION.

did i get the job boss?

Attached: Screenshot from 2019-07-08 14-43-10.png (3840x1080, 258K)

>localhost3000
nice ip, time to get pwnd kid

What the fuck does that wall of code even do?
>moment
Moment can add and subtract months out of the box, can't it?

I don't see any typescript and react/vue usage for those 4 buttons, you better learn today's tools harder, kiddo

>using var not const
>inline html
>using + to concatenate and not template literals
>initalising express directly under where you import dependencies
Apply again in 6 months.

In all honesty.
They should have showed him how everything worked.

Who the fuck gives a newbie even remotely acces to sensitive data.

guy with about 15 years of VB/C#/Webdev experience put a flag that tracked browser state as a static bool on the C# controller.

lead dev would not give anymore development tasking to him after this and was delegated to customer support for legacy systems until he was laid off a month or two later.

exactly

non-asp here, what does it mean?

That's bullshit and i don't believe it. And i mean the second part

>>cutting hairs this fine
nobody likes working with you, do they?

So does this mean every time the controller was called by a user it would only read the bool of the last user?

That accessed it.

Static fields have nothing to do with asp. This is just generic incompetence.

yeah he fucked up, but if their entire operation could be taken down by an accidental DB wipe, then they're infinitely more retarded than he is and deserved everything they got.

brainlet doesn't understand entities and relationships and estimating future database requirements... makes a dunning kruger judgement on his boss...


maybe you should keep your ego in check and ask your boss questions and try to learn something from him instead of being an insufferable little faggot.

Yeah it was an app-wide flag shared by every user's browser.
State that should have been scoped to each user's browser was being stored on app wide server code.
It highlighted incompetence at every level: general OOP, web dev, and the MVC system as a whole.
It was just the last straw it wasn't an isolated incident.
Prior to this he was delegated to some basic CRUD section of the code which he took months to write and had to be re-written anyways.
He also was tasked with a minor css tweak which he spent a week to work on and ultimately couldn't figure out.

First dev job I got, all devs had basically unfettered access to prod database. They also stored ssn, credit card numbers, and passwords in plaintext.

that shit scares me and makes me feel better about myself at the same time.

but template literals are based beyond belief

Readable and straight forward code is more important that jerking off your e-peen. Let me reiterate that nobody likes you at your job. I guarantee it.

Attached: vfdvfd.jpg (292x173, 6K)

Attached: so i see you're running gnome.webm (640x360, 384K)

There's no way this is real and if it is this company did not deserve to survive anyway

the OP asked for critique and got it. This was all valid advice

Heh, only 5 minutes and i'm already in, nothing personal kid.

He's a dumbass, but there's an even bigger dumbass giving access to production db.

Seems relatively common in older companies, and they can't be assed to switch things until they get slapped with the huge PCI compliance fines

>Falling for the CS meme
>When DevOps is the easymode fast track to 6-figure salary

I learned everything I needed for interviews in like 15 days lol

When I did my interview my current boss left me his company laptop fully signed in to the root user on all production AWS accounts so I could use it to "write down my answers" to a questionnaire and I was alone in the room for 30 minutes.

I could have completely ruined the company before I was ever hired.

This is a stupid fucking industry.

>people actually believing this
I want Jow Forumsedditors to leave already

>studying compsci for money
>lifting for women
Can't you faggots just do stuff you enjoy because you enjoy it? There is no faster track to a meaningless existence than doing things for other people. Join me in the grad student ranks and get paid just enough to feed yourself and break new ground in computer science knowledge

absolutely based post. I am a post-bacc in the fucking fast lane to the grad program rn, im in the gauntlet of CS cirriculum next semester or two. But i fucking love it. I have so many interests. Its such a fun field to me

Something like this should be good. You owe me $20 for doing your homework
const momentToString = date => date.format(moment.localeData().longDateFormat('L'))

const Date = ({ children: date }) => {momentToString(date)}

const Dates = () => (

{moment().subtract(1, 'month')}
{moment()}
{moment().add(1, 'month')}
{moment().add(1, 'month')}

)

>cutting hairs
I have fucked people so much harder during code review for 1/10th of the things you did. In my line of work, we get paid for good quality software. That's the only difference between us and pajeets
Starting from the top
>require imports and not es6 imports
>var instead of const
>no templating
>not SANITIZING YOUR GAWDDAMN INPUTS
>conflicting casing (snake_case for one function, camelCase for another)
>createButtons builds a HTML page. It doesn't just "create buttons"
>accept input as date/moment, not string (avoids pitfalls of doing create buttons(date.valueOf()) while it creates the moment object inside)
>use month_lookup.push
>moment.add() is modifying the value. use moment.clone().add() or add 1 month at a time (not k)
>no tag

Use create-react-app next time.

different user, what if I was going for CS, with more focus towards software engineering?

threads like this remind me that i don't know jack shit. i would get absolutely fucked by any code test rn and i only have 2 more semesters of my cs meme degree

You mean be a slave in Academia?

>That's the only difference between us and pajeets

Lol.

that fucking webm made me lose my shit

OP didn't specify where the original month info is coming from, just assuming sanitary input here. Why is everyone using moment?

const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

function monthIndexToButton(index) {
return `${months[index]}`
}

function startingMonthToButtons(monthString) {
const startingIndex = months.indexOf(monthString);

return `

${monthIndexToButton((startingIndex + 11) % 12)}
${monthIndexToButton(startingIndex)}
${monthIndexToButton((startingIndex + 1) % 12)}
${monthIndexToButton((startingIndex + 2) % 12)}

`;
}

>require imports and not es6 imports
why the fuck would you use imports with node? CJS is superior and more flexible.
you're getting paid for being a medium.com-blogger tier evangelist apparently

l10n

i dont want non-english speakers looking at my website.

Can I transition into a programming or dba career with just codecadememe b/s?

MIS grad here with a dozen certs and decade of experience, mostly technician/helpdesk bs with a couple years admin. Been looking for another sysadmin or network gig for the past six months and have only gotten a single interview. IDK what to do.