Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "js question"
-
EDIT: devRant April Fools joke (2017)
-------------------------
@trogus and I have had an absolute blast working on devRant over the last year. However, we're strong believers in only working on a project if you're passionate about it, and over the last few months, we've sadly lost some of that passion so we've to announce, with heavy hearts, that we will both be moving on. We've decided to focus 100% of our energies on our next product, one which we are confident has billion dollar potential: Semicolon JS (http://semicolonjs.com).
We identified this sizable market opportunity as we were building out the new devRant website. Every JavaScript framework we tried left us wanting more. More efficiency. More elegance. More extensibility. That's what Semicolon JS is: more. More than a framework, it's a guiding philosophy. We believe that Semicolon JS will do for front end development what Material Design has done for user interface design. We're calling it Semicolon JS because even though you can still develop JavaScript without it, like a semicolon, we think it will soon become a standard and synonymous with quality JS development.
So comes the obvious question. What will happen to devRant? We wanted to make the announcement today because we will be officially shutting down the product in 30 days. So that gives everyone a full month to take in the last memories, look at those rants they really loved, and hopefully take some time to chat with @trogus and I about Semicolon JS and what we have planned.
With so many thanks and looking towards the future,
- @dfox and @trogus160 -
Interviewer: Who created JavaScript?
Me: ... Seriously?
Interviewer: Completely
WTF? First time I face that kind of question in an interview... For the record, I didn't know the answer, according to Wikipedia Brendan Eich created JS56 -
curl cheat.sh — get an instant answer to any question on (almost) any programming language from the command line
tldr
do curl cht.sh/go/execute+external+program to see how to execute external program in go
And this question: why I actually should I start the browser, and the browser has to downloads tons of JS, CSS and HTML, render them thereafter, only to show me some small output,
some small text, number or even some plot. Why can't I do a trivial query from the command line
and instantly get what I want?
I decided to create some service that will work as I think such a service should work.
And that is how wttr.in was created.
Nowadays you probably know, how to check the weather from the command line, but if not:
curl wttr.in
or
curl wttr.in/Paris
(curl wetter in Paris if you want to know the weather in Paris)
After that several other services were created (the point was to check how good the console
can solve the task, so I tried to create services providing information
of various nature: text, numbers, plots, pseudo graphic etc.):
curl rate.sx/btc # to check exchange rate of any (crypto)currency
curl qrenco.de/google.com # to QRenco.de any text
And now last but not least, the gem in this collection: cheat.sh.
The original idea behind the service was just to deliver a various UNIX/Linux command line cheat sheets via curl. There are several beautiful community driven cheat sheet repositories such as tldr, but the problem is that to use them you have to install them first, and it is quite often that you have no time for it, you just want to quickly check some cheat sheet.
With cheat.sh you don't need to install anything, just do:
curl cheat.sh/tar (or whatever)
you will get a cheat sheet for this command (if such cheat sheet exists inf one of the most popular community-driven cheat sheet repositories; but it surely does).
But then I thought: why actually show only existing cheat sheets? Why not generate cheat sheets or better to say on the fly? And that is how the next major update of cheat.sh was created.
Now you can simply do:
curl cht.sh/python/copy+files
curl cht.sh/go/execute+external+program
curl cht.sh/js/async+file+read
or even
curl cht.sh/python/копировать+файл
curl cht.sh/ruby/Datei+löschen
curl cht.sh/lua/复制文件
and get your question answered
(cht.sh is an alias for cheat.sh).
And it does not matter what language have you used to ask the question. To be short, all pairs (human language => programming language) are supported.
One very important major advantage of console oriented interfaces is that they are easily
programmable and can be easily integrated with various systems.
For example, Vim and Emacs plugins were created by means of that you can
query the service directly from the editor so that you can just write your
questions in the buffer and convert them in code with a keystroke.
The service is of course far from the perfection,
there are plenty of things to be fixed and to be implemented,
but now you can see its contours and see the contours of this approach,
console oriented services.
The service (as well as the other mentioned above services) is opensource, its code is available here:
https://github.com/chubin/cheat.sh
What do you think about this service?
What do you think about this approach?
Have you already heard about these services before?
Have you used them?
If yes, what do you like about them and what are you missing?26 -
We're using a ticket system at work that a local company wrote specifically for IT-support companies. It's missing so many (to us) essential features that they flat out ignored the feature requests for. I started dissecting their front-end code to find ways to get the site to do what we want and find a lot of ugly code.
Stuff like if(!confirm("blablabla") == false) and whole JavaScript libraries just to perform one task in one page that are loaded on every page you visit, complaining in the js console that they are loaded in the wrong order. It also uses a websocket on a completely arbitrary port making it impossible to work with it if you are on a restricted wifi. They flat out lie about their customers not wanting an offline app even though their communications platform on which they got asked this question once again got swarmed with big customers disagreeing as the mobile perofrmance and design of the mobile webpage is just atrocious.
So i dig farther and farthee adding all the features we want into a userscript with a beat little 'custom namespace' i make pretty good progress until i find a site that does asynchronous loading of its subpages all of a sudden. They never do that anywhere else. Injecting code into the overcomolicated jQuery mess that they call code is impossible to me, so i track changes via a mutationObserver (awesome stuff for userscripts, never heard of it before) and get that running too.
The userscript got such a volume of functions in such a short time that my boss even used it to demonstrate to them what we want and asked them why they couldn't do it in a reasonable timeframe.
All in all I'm pretty proud if the script, but i hate that software companies that write such a mess of code in different coding styles all over the place even get a foot into the door.
And that's just the code part: They very veeeery often just break stuff in updates that then require multiple hotfixes throughout the day after we complain about it. These errors even go so far to break functionality completely or just throw 500s in our face. It really gives you the impression that they are not testing that thing at all.
And the worst: They actively encourage their trainees to write as much code as possible to get paid more than their contract says, so of course they just break stuff all the time to write as much as possible.
Where did i get that information you ask? They state it on ther fucking career page!
We also have reverse proxy in front of that page that manages the HTTPS encryption and Let's Encrypt renewal. Guess what: They internally check if the certificate on the machine is valid and the system refuses to work if it isn't. How do you upload a certificate to the system you asked? You don't! You have to mail it to them for them to SSH into the system and install it manually. When will that be possible you ask? SOON™.
At least after a while i got them to just disable the 'feature'.
While we are at 'features' (sorry for the bad structure): They have this genius 'smart redirect' feature that is supposed to throw you right back where you were once you're done editing something. Brilliant idea, how do they do it? Using a callback libk like everyone else? Noooo. A serverside database entry that only gets correctly updated half of the time. So while multitasking in multiple tabs because the performance of that thing almost forces you to makes it a whole lot worse you are not protected from it if you don't. Example: you did work on ticket A and save that. You get redirected to ticket B you worked on this morning even though its fucking 5 o' clock in the evening. So of course you get confused over wherever you selected the right ticket to begin with. So you have to check that almost everytime.
Alright, rant over.
Let's see if i beed to make another one after their big 'all feature requests on hold, UI redesign, everything will be fixed and much better'-update.5 -
Javascript developer interview
One of the RH interviewers started asking about myself, personal information, etc..
He : well, let me introduce you our tech lead, he will make you some question about JS
Me : alright
Tech Lead : ummm, do you know javascript?
Me : yes..?
Tech Lead : ok, cool. We will call you.
I got the job..9 -
- 5 years ago -
Job interview question about mainly a Java position : where do you see yourself in 5 years?
*thinks about how fast things are changing, have no idea what the web, programming will be and even where I will end up and feel like this question is a trap*
Me: in not sure.. A dev lead
- now -
After changing 4 time jobs I'm a dev lead in node js3 -
Interviewed a dev for a junior role earlier this week...my first question:
const numbers = [0.1, 0.2, 0.3];
let sum = 0;
for (i = 0; i < numbers.length; ++i) {
setTimeout(() => {
sum += numbers[i];
}, 0);
}
// Refactor the preceding code so that the following returns true.
console.log(sum === 0.6);
---
He had no idea where to even start, so I asked him to walk through the code with me line by line, he couldn't get past line 1 - literally didn't know what an array was... I walked through the code with him and he just started to look more and more lost.
I didn't even bother with the rest of my questions on OOP, FP, etc...
Am I really expecting too much of somebody that claims to have 2 years practical experience in JavaScript, jQuery, Angular, and PHP?
Do you think this is a problem a junior dev should be able to solve...even if it takes some hand-holding?57 -
Following a conversation with a fellow devRanter this came to my mind ago, happened a year or two ago I think.
Was searching for an online note taking app which also provided open source end to end encryption.
After searching for a while I found something that looked alright (do not remember the URL/site too badly). They used pretty good open source JS crypto libraries so it seemed very good!
Then I noticed that the site itself did NOT ran SSL (putting the https:// in front of the site name resulted in site not found or something similar).
Went to the Q/A section because that's really weird.
Saw the answer to that question:
"Since the notes are end to end encrypted client side anyways, we don't see the point in adding SSL. It's secure enough this way".
😵
I emailed them right away explaing that any party inbetween their server(s) and the browser could do anything with the request (includingt the cryptographic JS code) so they should start going onto SSL very very fast.
Too badly I never received a reply.
People, if you ever work with client side crypto, ALWAYS use SSL. Also with valid certs!
The NSA for example has this thing known as the 'Quantum Insert' attack which they can deploy worldwide which basically is an attack where they detect requests being made to servers and reply quickly with their own version of that code which is very probably backdoored.
This attack cannot be performed if you use SSL! (of course only if they don't have your private keys but lets assume that for now)
Luckily Fox-IT (formerly Dutch cyber security company) wrote a Snort (Intrustion Detection System) module for detecting this attack.
Anyways, Always use SSL if you do anything at all with crypto/sensitive data! Actually, always use it but at the very LEAST really do it when you process the mentioned above!31 -
Why THE FUCK does the StackOverflow Community answer any JS related question with a solution containing jQuery - sometimes even without mentioning it?
Gosh - it's 2017 use Vanilla or at least a modern libary!10 -
I attempted an online test for a Java Developer role at a pretty big company.
The test had a JavaScript question.
🤦🏽♂️🤦🏽♂️
Just to clarify, the job description had no mention of JS6 -
Hello devRant,
I'm new in your community. Okay, not completely new because I try to introduce me in the community and now I think, I know how devRant works and what I could do here.
But who I am?
I'm David from Germany. I'm a hobby developer. I develop lots of stuff, Alexa Skills, Google Actions, Mobile Application for Android and Websites. I'm in a one team member "team"🤣. I develop the background and I "try"😉 to develop the foreground. I develop since 6-7 years and I start with HTML (I know it's not a programming language) but next to HTML I learned CSS. Now, I could programm in CSS, JS, PHP, MySQL, JAVA, C++, PHYTON and I hope I don't forget a language.
But the main question: Why I joined to the devRant community?
The main reason is that I want to see jokes meme and interesting topics. The secondary reason is that I hope I could learn English in a different way. I hope I'm not the worst English speaker/writer.26 -
Suddenly it hits me.
It’s 01:20 here but i get it.
It’s ALL a budget thing.
No dedicated tester means less expenses.
No personal parkspot?
No expenses!
And no good staging or testing environment? Less expenses!
Meanwhile every developer can setup, work on, and maintain about 20 websites on their shitty local Windows machine, that doesn’t even have a proper SSD installed, and we are setting impossible deadlines to figure out who will sink and who will swim.
Ow, here is a SSD.. Figure out the installation yourself because we have no IT knowledge or budget for people that do.
You want a challenge? How about 40 other people that are distracting you all day long.
Meanwhile everybody has to improve their skills in js, react, html5, ccs3, angular, .net and razor so money can made faster.
It would be nice if you could build apps as well.
You had a question? Sorry, no time. Expect some feedback 14 days later.
You finished the site?
Great!
But here are 101 bugs to solve before next week.
All hail their crazy company!2 -
Okay, story time.
Back during 2016, I decided to do a little experiment to test the viability of multithreading in a JavaScript server stack, and I'm not talking about the Node.js way of queuing I/O on background threads, or about WebWorkers that box and convert your arguments to JSON and back during a simple call across two JS contexts.
I'm talking about JavaScript code running concurrently on all cores. I'm talking about replacing the god-awful single-threaded event loop of ECMAScript – the biggest bottleneck in software history – with an honest-to-god, lock-free thread-pool scheduler that executes JS code in parallel, on all cores.
I'm talking about concurrent access to shared mutable state – a big, rightfully-hated mess when done badly – in JavaScript.
This rant is about the many mistakes I made at the time, specifically the biggest – but not the first – of which: publishing some preliminary results very early on.
Every time I showed my work to a JavaScript developer, I'd get negative feedback. Like, unjustified hatred and immediate denial, or outright rejection of the entire concept. Some were even adamantly trying to discourage me from this project.
So I posted a sarcastic question to the Software Engineering Stack Exchange, which was originally worded differently to reflect my frustration, but was later edited by mods to be more serious.
You can see the responses for yourself here: https://goo.gl/poHKpK
Most of the serious answers were along the lines of "multithreading is hard". The top voted response started with this statement: "1) Multithreading is extremely hard, and unfortunately the way you've presented this idea so far implies you're severely underestimating how hard it is."
While I'll admit that my presentation was initially lacking, I later made an entire page to explain the synchronisation mechanism in place, and you can read more about it here, if you're interested:
http://nexusjs.com/architecture/
But what really shocked me was that I had never understood the mindset that all the naysayers adopted until I read that response.
Because the bottom-line of that entire response is an argument: an argument against change.
The average JavaScript developer doesn't want a multithreaded server platform for JavaScript because it means a change of the status quo.
And this is exactly why I started this project. I wanted a highly performant JavaScript platform for servers that's more suitable for real-time applications like transcoding, video streaming, and machine learning.
Nexus does not and will not hold your hand. It will not repeat Node's mistakes and give you nice ways to shoot yourself in the foot later, like `process.on('uncaughtException', ...)` for a catch-all global error handling solution.
No, an uncaught exception will be dealt with like any other self-respecting language: by not ignoring the problem and pretending it doesn't exist. If you write bad code, your program will crash, and you can't rectify a bug in your code by ignoring its presence entirely and using duct tape to scrape something together.
Back on the topic of multithreading, though. Multithreading is known to be hard, that's true. But how do you deal with a difficult solution? You simplify it and break it down, not just disregard it completely; because multithreading has its great advantages, too.
Like, how about we talk performance?
How about distributed algorithms that don't waste 40% of their computing power on agent communication and pointless overhead (like the serialisation/deserialisation of messages across the execution boundary for every single call)?
How about vertical scaling without forking the entire address space (and thus multiplying your application's memory consumption by the number of cores you wish to use)?
How about utilising logical CPUs to the fullest extent, and allowing them to execute JavaScript? Something that isn't even possible with the current model implemented by Node?
Some will say that the performance gains aren't worth the risk. That the possibility of race conditions and deadlocks aren't worth it.
That's the point of cooperative multithreading. It is a way to smartly work around these issues.
If you use promises, they will execute in parallel, to the best of the scheduler's abilities, and if you chain them then they will run consecutively as planned according to their dependency graph.
If your code doesn't access global variables or shared closure variables, or your promises only deal with their provided inputs without side-effects, then no contention will *ever* occur.
If you only read and never modify globals, no contention will ever occur.
Are you seeing the same trend I'm seeing?
Good JavaScript programming practices miraculously coincide with the best practices of thread-safety.
When someone says we shouldn't use multithreading because it's hard, do you know what I like to say to that?
"To multithread, you need a pair."18 -
I'll use this topic to segue into a related (lonely) story befitting my mood these past weeks.
This is entire story going to sound egotistical, especially this next part, but it's really not. (At least I don't think so?)
As I'm almost entirely self-taught, having another dev giving me good advice would have been nice. I've only known / worked with a few people who were better devs than I, and rarely ever received good advice from them.
One of those better devs was my first computer science teacher. Looking back, he was pretty average, but he held us to high standards and gave good advice. The two that really stuck with me were: 1) "save every time you've done something you don't want to redo," and 2) "printf is your best debugging friend; add it everywhere there's something you want to watch." Probably the best and most helpful advice I've ever received 😊
I've seen other people here posting advice like "never hardcode" or "modularity keeps your code clean" -- I had to discover these pretty simple concepts entirely on my own. School (and later college) were filled with terrible teachers and worse students, and so were almost entirely useless for learning anything new.
The only decent dev I knew had brilliant ideas (genetic algorithms, sandboxing, ...) before they were widely used, but could rarely implement them well because he was generally an idiot. (Idiot sevant, I think? Definitely the idiot part.) I couldn't stand him. Completely bypassing a ridiculously long story, I helped him on a project to build his own OS from scratch; we made very impressive progress, even to this day. Custom bootloader, hardware interfacing, memory management, (semi) sandboxed processes, gui, example programs ...; we were in highschool. I'm still surprised and impressed with what we accomplished.
But besides him, almost every other dev I met was mediocre. Even outside of school, I went so many years without having another competent dev to work with. I went through various jobs helping other dev(s) on their projects (or rewriting them), learning new languages/frameworks almost every time: php, pascal, perl, zend, js, vb, rails, node, .... I learned new concepts occasionally (which was wonderful) but overall it was just tedious and never paid well because I was too young to be taken seriously (and female, further exacerbating it). On the bright side, it didn't dwindle my love for coding, and I usually spent my evenings playing with projects of my own.
The second dev (and one one of the best I've ever met) went by Novo. His approach to a game engine reminded me of General Relativity: Everything was modular, had a rich inheritance tree, and could receive user input at any point along said tree. A user could attach their view/control to any object. (Computer control methods could be attached in this way as well.) UI would obviously change depending on how the user could interact and the number of objects; admins could view/monitor any of these. Almost every object / class of object could talk to almost everything else. It was beautiful. I learned so much from his designs. (Honestly, I don't remember the code at all, and that saddens me.) There were other things, too, but that one amazed me the most.
I havent met anyone like him ever again.
Anyway, I don't know if I can really answer this week's question. I definitely received some good advice while initially learning, but past that it's all been through discovering things on my own.
It's been lonely. ☹2 -
So I watched this video that tries to convince people, that the jQuery library isn't really best practice anymore and showed how you can achieve basic tasks with vanilla JS, aswell as some frameworks (Vue, React, Angualar) and how they handle interactions with the DOM.
It also talked about how nearly every JS question on SO has top answers using jQuery, and how that's a bad thing.
But what I found in the comment section of this video was pure horror: So-called "Developers" defending jQuery to the death. Of course there were some people who made some viable arguments (legacy code, quick & dirty projects), but the overwhelming majority were people making absurd claims and they seemed quit self-confident.
GOSH!
Want an example?
Look:22 -
Inspired by the comment I posted on another rant.
My uni decided to be one of those progressive tech schools that start people with Python. Mind you, I had prepared myself with studying as much as I could with math and programming by automating things and similar stuff in our computer when I was at my previous job, so I had a better idea as to what i could expect.
Introduction to computer science and programming with Python or some shit like that was the name of the class, and the instructor was a fat short ugly woman with a horrible attitude AND a phd in math, not comp sci and barely any industrial knowledge of the field.
She gave us the "a lot of you will fail" speech, which to me is code for "I suck and have no clue what I am doing"
One assignment involved, as per the requirements the use of switch cases. Now, unless someo knew came about, Python does not have swio cases. Me and a couple of less newbie like students tried to point out that switch cases were non existent and that her switch case example was in Javascript, not python, curly braces and everything. She told us to make it work.
We thought that she meant using a function with a dictionary and we pass the key and shit, a simple way of emulating the switch case.
NOPE she took points and insisted that she meant the example. We continuously pointed out that her example was in JS and that at the time Python did not have switch cases. The nasty woman laughed out and said that she didn't expect anyone to finish the assignment with full points.
Out of 100 points everyone got a 70. No problem. Wrote a detailed letter to the dean. Dean replied and talked to her (copied her in the email because fuck you bitch) and my grade was pulled up to full mark.
Every other class I had with her she did not question me. Which was only another class on some other shit I can't remember.
Teachers are what make or break a degree program. What make or break the experience, going to college is putting too much faith on people. If you ask me, trade certification, rigorous training is the future of computer science, or any field really. Rather than spending 4+ years studying a whoooole lotta shit for someone to focus on one field and never leave it.17 -
Code review time:
Hey Rudy, can you approve my PR? ??? Shouldn't it be can you review my PR?(thought to myself)
Anyway, as a new practice, we(royal we) do not approve PRs with js files. If we touch one, we convert it to typescript as part of a ramp up to a migration that never seems to get here. But I digress.
I look at the laziest conversion in history.
Looked like
Import 'something';
Import 'somethingElse';
Import 'anotherSomething';
export class SomeClass {
public prop1: any;
public prop2: any;
public prop3: any;
public doWork(param: any){
let someValue = param;
// you get the idea
return someValue;
}
}
Anyway, I question if all the properties need to be visible outside of the class since everything was public.
Then if the dev could go and use type safety.
Then asked why not define the return type for the method since it would make it easier for others to consume.
Since parts of the app are still in js, I asked that they check that that the value passed in was valid(no compilation error, obviously).
Also to use = () => {} to make sure "this" is really this.
I also pointed out the import problem, but anyway.
I then see the his team leader approve the PR and then tell me that I'm being too hard on his devs. ????
Do we need to finish every PR comment with "pretty please" now?
These are grown men and women, and yet, it feels oddly like kindergarten.
I've written code in the past that wasn't pretty and I received "WTF?" as a PR comment. I then realized I ate sh*t on that line of code, corrected it and pushed the code. Then we went to Starbucks.
I'm not that old(35), but these young devs need to learn that COMPILERS DO NOT CARE ABOUT YOUR FEELINGS!!!!!
Ahhhhhh
Much better.
Thanks for the platform.8 -
HR Firms are the worst!!
Just wasted 30 mins of my life.
Interviewer: Tell me about experience.
[ me after talking about various project I have worked on/ build using (js, ruby, React js, git...bla bla bla).
[ 10mins later answering pretty dumb question ]
Interviewer: Do you know about coding?
Me: jeez really, c'mon... is that a question - I just told you about my X years of experience and you asking me if I know how to code?
[Interviewer look at another dumb questions from her list]
Me: You know there are so many different broken links on your websites right? on the landing page there are many links that direct you to the HTML templates.
Interview: thanks...3 -
Today we had our "web technology" University exam. One question was to write a sample html program for our university's website.
I swear I could've built a fully functioning website on MVC and hosted it on some cloud service in far less time than that I spent scribbling 5 pages of writing HTML/CSS/JS so that I can "pass the exam". But nooooo. Our university syllabus takes IE and Java servlets as standard and apparently you get bonus marks if you could implement IE's Active-X on paper.
So much for the future web development4 -
Grr the feeling when one of your interviewers has a hard-on for trying to find ways to sink your boat.
Went to a job interview yesterday during my lunch break for a mid level dev job in central London , i have been trying to transition from a junior role.
First were two senior devs , that went quiet well...
Next up was the tech lead and a team lead, lets call the latter Mc-douche for some problem
The tech lead was fine, very relaxed and clam guy more interested in seeing the logic of my answers and questions as to why i did certain things in this or that manner....
Mc-douche, he would always try to find something wrong then smile smugly and do that sideways head waggle thing
His tech lead is like " yup that's correct"
But he would be like " yeeess but you didn't think about bla bla bla" then talk about shit not even present in the context of the question
Ah also he would ask a question then cut me off as soon as I begin to say that i didnt mention or take into account x or y even though literally my next sentence is about address those details he wanted.
let me fucking finish you dickbag 😡
Had a js question, simple stuff about dom manipulation, told not to bother with code... yet McD starts asking me to write the code for it....managed it , quite easy stuff
Then a sql and db test , again technlead was happy with the answers and the logic am approaching the question when writing my query, yet mc d Is bitching about SQL syntax....
Ok fine, i made a simple mistake, I forgot and used WHERE instead of HAVING in a group by but really?! Thats his focus ?!
Most devs I know look up syntax to do stuff , they focus on their logic first the do the impl.
Then a general question on some math and how i would code to impl a solution on paper
That was a 20 mins one, the question said they didn't expect me to finish it totally so
I approached it like an exam question.
First
I focussed on my general flow of my process, listing out each step.
Then elaborated each step with pseudo code showing my logic for each of the key steps.
Then went deeper and started on some of the classes and methods , was about to finish before it was time up.
Mc douch went through my solution
And grudgingly admitted my logic was "robust enough" it was like he really had to yank that deep out of his colon.
I didn't really respond to any of his rudeness throughout the whole interview,i either smiled politely or put on a keen looking poker face.
Really felt awful the rest of the day, skipped the gym and went home after work, really sucks to have a hostile interviewer.
Pretty sure i wont be hearing anything good from them even though the three other interviewers were happy with me I felt.4 -
I’m trying to add digit separators to a few amount fields. There’s actually three tickets to do this in various places, and I’m working on the last of them.
I had a nightmare debugging session earlier where literally everything would 404 unless I navigated through the site in a very roundabout way. I never did figure out the cause, but I found a viable workaround. Basically: the house doesn’t exist if you use the front door, but it’s fine if you go through the garden gate, around the back, and crawl in through the side window. After hours of debugging I eventually discovered that if I unlocked the front door with a different key, everything was fine… but nobody else has this problem?
Whatever.
Onto the problem at hand!
I’m trying to add digit separators to some values. I found a way to navigate to the page in question (more difficult than it sounds), and … I don’t know what view is rendering the page. Or what controller. Or how it generates its text.
The URL is encrypted, so I get no clues there. (Which was lead dev’s solution to having scrapeable IDs instead of just, you know, fixing them). The encryption also happens in middleware, so it’s a nightmare to work through. And it’s by the lead dev, so the code is fucking atrocious.
The view… could be one of many, and I don’t even know where they are. Or what layout. Or what partials go into building it.
All of the text on the page are “resources” — think named translations that support plus nested macros. I don’t know their names, and the bits of text I can search for are used fucking everywhere. “Confirmation number” (the most unique of them) turns up 79 matches. “Fee” showed up in 8310 places before my editor gave up looking. Really.
The table displaying the data, which is what I actually care about, isn’t built in JS or markup, but is likely a resource that goes through heavy processing. It gets generated in a controller somewhere (I don’t know the resource name so I can’t find it), and passed through several layers of “dynamic form” abstraction, eventually turned into markup, and rendered as a partial template. At least, that’s how it worked in the previous ticket. I found a resource that looks right, and there’s only the one. I found the nested macros it uses for the amount and total, and added the separators there… only to find that it doesn’t work.
Fucking dead end.
And i have absolutely nothing else to go on.
Page title? “Show”
URL? /~LiolV8N8KrIgaozEgLv93s…
Text? All from macros with unknown names. Can’t really search for it without considerable effort.
Table? Doesn’t work.
Text in the table? doesn’t turn up anything new.
Legal agreement? There are multiple, used in many places, generates them dynamically via (of course) resources, and even looking through the method usages, doesn’t narrow it down very much.
Just.
What the fuck?
Why does this need to be so fucking complicated?
And what genius decided “$100000.00” doesn’t need separators? Right, the lot of them because separators aren’t used ANYWHERE but in code I authored. Like, really? This is fintech. You’d think they would be ubiquitous.
And the sheer amount of abstraction?
Stupid stupid stupid stupid stupid.11 -
I am a firmware developer with 4 years experience. C and sometimes assembly is my bread and butter.
Like 2 years ago, I was really interested to make a switch to application development. Got referred by my friend to her startup.
But I was a bit rusty with my data structures, high level languages and interpersonal skills.
The first question was to find the number of occurences for each word in a paragraph. The language choice was Java. But I was allowed to use C++ since it was the closest relative to Java that I knew.
And I started implementing a binary search tree from scratch and started inserting each tokenised word into it, wrote a traversal algorithm.
The interviewer, luckily, was a patient guy. After I completed my whole mess, he asked is it possible to do this in a slightly better way with constant time access without traversal.
I said yes, we can with a hash table but I dont know how to implement one. He replied I dont expect you to implement the hash table but see you use it. I asked him if I am allowed to used the standard library, for which he said ofcourse.
*facepalm*.
Finally I understood his expectation, referred cppreference.com and used an unordered_map.
Later there were some quesion on databases for which I tried my best to answer. And I frankly replied that I am not comfortable with JS frameworks as of now. Got rejected.
So the mistake is I never asked basic questions like what is the time complexity expects, if I was allowed to use standard library, didnt spend some extra time on studying stuffs needed for the domain switch and most importantly I panicked.7 -
The most awaited "Trivia Bot" is here, asks technical trivia on various topics, uses quizapi.io,
Source Code: https://gist.github.com/theabbie/...
You know it's written in JS, if it fucks up, not my fault.
To use, call, @trivia
Gives a question and atmost 5 options, reply with option ID.
Demo in Comments.302 -
TL;DR you suck, I suck and everybody sucks, deal with it....
------------------------------------
Let me let off some steam, since I've had enough of people hating on languages "just because"
Every language has it's drawbacks and quirks, BUT they have their strengths also. Saying "I hate {language}" is just you being and ignorant prick and probably your head is so far up your ass that you look like an ass hat. With that being said, every language is either good or bad depending on the developer writing in it. Let's give you an example:
If I ware to give you a brick and ask you to put a nail in a plank, can you do it? Yes, it will be easier if you do it with a hammer, but you have a brick, so hammer is out of the question. If you hit your thumb while doing it... well... sorry, but it is not the bricks fault - it is YOU!
JavaScript, yes it has a whole lot of problems, but it works, you can do a ton of stuff and does a good job at that, it is evolving through node and typescript (and others, just a personal pref), BUT if you used js when you ware debugging that jquery (1.0) plugin written in the free time of a 13 yo, who copy pasted a bunch from SO, well, it is not js' problem - deal with it. Same goes for PHP, i've been there where you had a single `index.php` with bazillion lines of code, did a bunch of eval and it was called MVC, but it also is evolving.. thing is all languages allow you to do some dumb stuff so YOU have to be responsible to not fuck it up (which you always DO btw, we all do). Difference is PHP/JS roll with it because the assumption is that you know what you are doing, which again - newsflash - you don't.
More or less I would blame that shit on businesses which decided to go with undergrads to save money instead of investing in their product, hell, I am in a major company that does not invest that doesn't care a whole lot about dev /tech stuff and now everybody's mother is an engineer - they care about money, because investors care about money (ROI) and because clean code does not pay the bills, but money does.
If we get all of the good practices and apply them to each language every one of them has it's place, that is why there is no "The Language", even if there was, we STILL ware going to fuck it up and probably it was going to be even worse than where we are now.
Study, improve, rinse and repeat... There are SENIORS and LEADS out there that are about 25-30 and have no fucking clue about the language, because they have stuck up their heads up the ass of frameworks and refuse to take a breath of clean air and consider something different than their dogmatic framework "way" of doing things.. That is the result you are seeing. Let me give you a fresh example to illustrate where I am at atm:
Le me works with ZendFramework 2.3-2.5 (why not, which is PHP5+ running on PHP7 [fancy, eh]), and little me writes a module for said project, and tries to contain it in its own space, i.e not touching anything outside of the folder of the module so it is SELF-CONTAINED (see, practices), during 2-3-4 iterations of code review, I've had to modify 4 different modules with `if (somthing === self::SOMETHING_TYPE)` as requested by my TL, which resulted in me not covering 3 use-cases after the changes and not adding a new event (the fw is event-driven, cuz.. reasons) so I have to use a bunch of ifs in the code, to check a config value and do shit. That is the way of I am asked to do things I hate what I've done and the fact that because of CR I have lost case-coverage, a week of work and the same TL will be on my ass on monday that things are now "perfect".
The biggest things is "we care about convention and code style"... right.... That is not because of the language, not because of me, not because of the framework - it is some dude's opinion that you hate, not the language.
New stuff are better, reinventing the wheel is also good, if it wasn't you would've had a few stone circular things on your car and things ware going to be like that - we need to try and try, that is the only way we actually learn shit.
Until things change in the trade, we will be on the same boat, complaining about the same shit over and over, you and me won't be alive probably but things will not change a bit.
We live in a place where state is considered good, god objects necessary (can you believe it, I've got kudos for using the term 'God Object'... yep, let that sink in). If you really hate something, please, oh god I beg you, show me how you will do it better and I will shake your hand and buy you a beer, but until then, please keep your ass-hurt fanboy opinion to your self, no one gives a shit about what you think, we will die and the world will not notice...6 -
I'm gonna decline the next time someone asks me "hop in chat with them" to discuss their stackoverflow problem.
I'd already given my two cents about the problem in question and I thought something was unclear about that so I say okay what the hell, made a chat room and invited him in.
Him: So I have this OTHER problem with [insert JS plugin]
Me: ... I don't know enough about it. I've used that specific plugin maybe once. The question I offered you my help with was PHP.
Him: Yeah but can you take a look really quick?
Me: I'd have to reread the documentation. I literally don't remember how to use it.
Him: No problem, here's the documentation. I want to do X, Y and Z.
Me: I don't think you can X without doing A and B first.
Him: I was told not to do A, so how can I do X, Y and Z?
Fucking hell I'm not gonna do your job for you. You know english. There is documentation available. Just read it and at least try things.2 -
Why the fuck do people learn a framework if they don't even know the fucking most basic knowledge about the language.
Every fucking JS dev should know what the fucking toString result of a function object is! Thats like second page JS book stuff.
Even for Facebook groups this is a horrible question.5 -
Really fed up with my colleague and possibly my job. Am starting to doubt am cut out to be a developer
Am a junior java dev , been working working for this company for about 2 years now. Although they hired me to be a java dev, they pretty much exclusively had me working on JavaScript crap because none of the other more senior devs wanted to do even so much as poke JS with a long stick....
Oh and the salary was crap but i figured since i had barely 3 years of exp i thought i would stick with it for a while
But a few months ago after seeing other opportunities I got fed up and threatened to quit , already started interviewing etc
Got an offer, not exactly what i wanted but better than where i was. Went to quit but they freaked out and started throwing money at me. They matched and exceed the other salary and promised to addressed the issues that made me want to leave. Ie get me to work more on the java side of the project and have me work with someone more senior who could sort of mentor me, i had been working semi solo on the js shit till then...
The problem is that my supposed mentor is selfish prick... he is the sort of guy who comes in real early, basically he goes to early morning prayer then come in at some ungodly hour and fuckoff home around 3pm
He does all his work early morning then spends the rest of the day with his headphones on stealthily watching youtube, amazon, watching cricket, reading about Palestine , how oppressed muslims are or building a website for some mosque.
I asked him to let me sit with him so that I could just learn how this or that part of the sys worked , he agreed then the very next day comes in and does all the work before i get in at 9 , i asked him how he did it and he tells me oh just read the code.
Its not as simple as that, out codebase is an old pile of non standard legacy dog shit. Nothing works as it should, i tried to go through documentation online for the various stuff we use , but invariably get stuck when i try the usual approach because it turns out the original devs had essentially done a lot of custom hacks and cowboy coding to get stuff working, they screwed around with some of the framework jars & edited libraries to get stuff to work, resulting in some really weird OSGI errors.
My point is that i cant really just "read the code" or google ...
I gotta know a bit more what was actually modified and a lot of this knowledge isn't fucking documented, theres a lot of " ohhh that weird bug yeah yeah that happens cuz x did this hack some years ago to fix this issue and we kinda built on it, yeah we weren't supposed to do that but heyyy what u gonna do, just do this or that instead"
I was asked to set up a web service to export something, since thats his area of expertise and he is suppose to be teaching me the ropes, i asked him to explain where i should start and what would the general workflow be, his response is to tell me to just copy the IMPORT service and rename it to export then "just do it um change it or something" very helpful indeed (building enterprise application here nothing complex at all!!)
He sits right next to me so i can see how much works he actually does, i know when he just idly sitting there so thats when i ask him questions, he always has his earphones on so each time i gotta find a way to get his attention with a poke or a wave, he will give a heavy sigh and a weary look as he removes his headphones, listen to my question then give me the shortest answer possible before IMMEDIATELY turning away and putting his headphones on as fast as possible regardless of whether I actually understood or even heard what he said. If i ask another question ( am talking like an immediate follow up question for a clarification or something) he will
Do the whole sigh + tired look routing to make me know yeah you are disturbing me. ( god was so happy the day he accidentally sat on and broke them)
Yesterday i caught a glance at his screen as i was sitting down and i think he and another dev were talking about me
That am slow with my work and take forever to get into gear.
Starting to have doubts about my own ability n wether am really cut out to be a developer. I know i can work hard but its impossible to do so when you have no clue where to start and unable to look it up since all the custom hacks doesn't really allow any frame of reference.
Feels like am being handicapped and mocked, yesterday i just picked up my gear n left the office.
I never talk ill about my colleagues, whenever i have a 121 with my mgr i always all is fine, x n y are really helpful etc
I tried to indirectly tell my other colleague about this guy, he told me that guy had kinda mentally checked out of this job and was just going through on auto pilot and just laughed it off (they have been working together for almost a decade and a buddies) my other colleague is pretty nice but he usually swamped with work so i feel bad to trouble him.
Am really Fed up with it all7 -
The company I work for offered a Javascript Course/Training for every developer to enroll, which happens to take place on 3 days. In the description it was ensured to be for everyone, doesn't matter if you are an expert or beginner: there's something to learn for everyone.
The company described him as a top coacher in Austria and that he is overbooked for 2 years. High in demand indeed. "Has to be good", I thought. As a relatively average JS developer, there has to be something to learn for me.
Sitting here the second day, I fucking regret to join this shit. I have never seen such a bullshit in my lifetime. Why the fuck would you even book this man, he doesn't even understand basic concepts of software engineering. Just reading down the script, opening the script on one laptop and showcaseing it on the other. When someone asks a question, there's a 70% chance he doesn't know the answer. It takes this scumbag 30 fucking seconds to define a function; probably making spelling mistakes alongside.
I don't even want to know how much this dude will make from this "coaching". Hoped that it'd get better over time but I don't see an improvement. Contacting my boss that I'll leave this "training".7 -
I just installed Opera Mini on my PSP. That alone isn't very exciting on its own, although I am stoked that my website does in fact render on a device from 2009. With the helpful guidance of a laptop from 2004 that's doing the hotspot duties for this thing.
No, what really got me stoked is that Opera still supports these old platforms, and how small they managed to make it. The .jar file for Opera Mini 4.5 is ~800kB large. There's a .jad file as well but it's negligible in size and seems to be a signature of sorts.
Let that sink in for a moment. This entire web browser is 800kB. Firefox meanwhile consistently consumes 800 MEGABYTES.. in MEMORY. So then, I went to think for a moment, how on earth did they manage to cram an entire functioning web browser in 800kB? Hell, what makes up a web browser anyway?
The answer to that question I got to is as follows. You need an engine to render the web page you receive. You need a UI to make the browser look nice. And finally you need a certificate store to know which TLS certificates to trust. And while probably difficult to make, I think it should be possible to do in 800k. Seriously, think about it. How would you go *make* a web browser? Because I've already done that in the past.
Earlier I heard that you need graphics, audio, wasm, yada yada backends too.. no. Give your head a shake. Graphics are the responsibility of the graphics driver. A web browser shouldn't dabble with those at all. Audio, you connect to PulseAudio (in Linux at least) and you're done. Hell I don't even care about ALSA or OSS here. You just connect to the stuff that does that job for you. And WebAssembly.. God I could rant about that shit all day. How about making it a native application? Not like actual Assembly is used for BIOS and low-level drivers. And that we already have a better language for the more portable stuff called C.
Seriously, think about it. Opera - a reputable browser vendor - managed to do it in 800kB on a 12 year old device. Don't go full wank on your framework shit on the comments. And don't you fucking dare to tell me that there's more to it. They did it for crying out loud. Now you take a look at your shitpile for JS code and refactor that shit already. Thank you.21 -
OMFG. Here's a self-rant for you all...
So, working on a JS library to build widgets, I five across some weird behaviour where I expect `$.ajax.apply()` to pass something to the chained `.done()` method, but it comes out differently.
Fuck. Right, time to visit StackOverflow and glean some knowledge.
I post a question, complete with examples and descriptions and a little midget unicorn in the corner for world peace.
Come back a bit later to see what's happened, and nobody understands my damn question!
So I proceed to debate a few points with some other devs, going back and forth for a while, but still nobody knows what I'm asking.
Fuck. Time for a JSFiddle...
Copy code from the jQuery docs and start modifying it to show what I was working with... Now suddenly is all working as the docs say.
O.o
So I go look back at my own code again to try work out what's actually going on.
Turns out I completely missed MY OWN CODE.
Fuck me.1 -
Fuck jQuery. The only reason I see anyone using it legitemately is because of backwards compatibility. Almost every jq method is either native js or native css. The problem is, some devs become practically dependent on a library. By then, they are no longer js devs. They are jQuery devs. When you find yourself going to the docs of a lib before native methods 9 times out of 10 you've gone past the turning point. When you find yourself including jQuery instinctively, you're gone. StackOverflow is a great example of this:
Question - 1 up
Pure JS answer - 0 ups
jQuery answer (same length) - 2 ups and accepted
Come on man. It's 2018! We shouldn't be writing jQuery anymore. Native methods ftw!15 -
Ok, Why tha Fuck does everyone bitch about javascript, like seriously why?
Its a damn great language and i have fun working with it. sure some people prefer other languages but it seems people who haven't even tried JS properly talk shit about it.20 -
hey guys,
I've been working with js for like 5 years now, and I figured I could help some people out, if needed.
I wouldn't consider myself a js lord, but I have some decent experience, and even if I don't know something I'll be honest about it and at the very least I'm pretty sure I'll point you in the right direction.
I'm fond of vue, lodash, es6, node, eslint bla bla. I also know rails.
In any case, my objective with this is to learn myself.
So feel free to tag me if you have any type of question about anything js.
Cheers.11 -
Man, people have the weirdest fetishes for using the most unreadable acrobatic shell garbage you have ever seen.
Some StackOverflow answers are hilarious, like the question could be something like "how do I capture regex groups and put them in a variable array?".
The answer would be some multiline command using every goddamn character possible, no indentation, no spaces to make sense of the pieces.
Regex in unix is an unholy mess. You have sed (with its modes), awk, grep (and grep -P), egrep.
I'll take js regex anytime of the day.
And everytime you need to do one simple single goddamn thing, each time it's a different broken ass syntax.
The resulting command that you end up picking is something that you'll probably forget in the next hour.
I like a good challenge, but readability is important too.
Or maybe I have very rudimentary shell skills.5 -
!rant
Been working on a custom html partial injector (js/jquery only) as both a personal challenge and utility to use for my website scaffold. Being a challenge, i decided not to look at any implementation from another JS framework. I won't lie, i had it 'working' at least 5 times now, but this time, after about 3-4 days, i think i got it for real. And the cool thing? It's a bit less code than my original implementation even with my generous whitespace and verbosity. And it even unwraps nicely so it looks like a regular html page in the dev tools.
I love when things finally work as they should--God knows i question my motives before then.2 -
I got a median-pay front-end job through a contractor (after a contract from hell...but yeah I didn't learn...) and I'm getting zero assignments after a month and nobody seems to know what my role is.
I'm one month in, and every week I have to email my boss to remind her to sign my paycheck, which is stressful because I'm charging for my time because my assignments are like "Research this" or "look at this Wordpress theme or brand guide". The team never communicates but once a week, and I'm beginning to believe that I'm not a good fit for the team because they are impossible to get a hold of and the sysadmin won't give me access to anything even when I CC my boss. (I don't want to grief this guy...) Despite this, I've been told privately by higher-ups on a few occasions that they plan to hire me full time by November...
My SO thinks that the reason people are so dodgy toward me is because they literally do nothing and I'm breaking the flow of that by asking for things. I'm used to agency output, which can be toxic and where everything is 'due yesterday', and I'm watching this team work on assignments ten times slower than normal. ("You want to change a phone number on a website footer? You'll get it next week...maybe." I can't step on toes because I don't have access...) I'm perfectly fine with having to wear several hats at a low-stress job, but I can't even get my first assignment and I'm still being asked who I am in weekly meetings, or asked things like, "Would you even be willing to relocate here?" (I actually live DOWN THE STREET FROM THE OFFICE!! WHY DO I HAVE TO BE REMOTE? Why am I being asked this question?) It feels like my boss impulse hired me, with zero input from the team, and had no real reason to hire me in the first place...
It could also be another issue: Yeah, my experience is in PHP/JS/React, "but here have a seven year old .NET project and a company laptop with zero documentation and make this form import data to a database we know nothing about." Lead dev won't even talk to me.
I feel like a joke.2 -
interview from the other side. A month ago I was looking for frontend dev for team I lead.
Now I believe that it was a nightmare for one guy, whos bio was full of js, angular and a little of php. Thought that he will be the man we were looking for.
Nope. I've started with classic (I suppouse) questions, like call and apply difference. Guy couldn't even manage to say a word. Went to bubbling, nothing. Ok sth easier, hoisting... Maybe at least you're minifying your code? donno what is. Ok so what you actually did from js? "I know jQuery, did something in this, and did full angular app to build forms, store and send them", but after question what Factory is he covered his face in hands, went still for about three minutes and probably would start to cry but we stopped this. I feel sorry for this guy, but he applied for senior frontend position.9 -
While parsing nodes in a graph.
In terms of readability and variable naming, how wrong (if at all) is to use:
1. broNode (for sibling nodes)
2. papaNode / mamaNode (for parent nodes)
3. babyNode (for child nodes)
I sincerely don't know how to review this PR7 -
I've been given an intern to help me with my work (lol it's not helping) and she knows almost nothing of web dev, not even what Nodejs is, I had to explain it and guide her step by step on how to install it on her laptop. On her CV it says she has JavaScript experience, but she cannot even put together a basic HTML page, she asked me what a div is. As far as I know, HTML, CSS and JS are pieces of the same pie and you cannot really work with JS unless you also work with HTML and CSS. I think she lied on her CV and I need to tell my manager.
My question is, is it normal to know JavaScript and not know much about HTML and CSS?10 -
So, I've had a personal project going for a couple of years now. It's one of those "I think this could be the billion-dollar idea" things. But I suffer from the typical "it's not PERFECT, so let's start again!" mentality, and the "hmm, I'm not sure I like that technology choice, so let's start again!" mentality.
Or, at least, I DID until 3-4 months ago.
I made the decision that I was going to charge ahead with it even if I started having second thoughts along the way. But, at the same time, I made the decision that I was going to rely on as little external technology as possible. Simplicity was going to be the key guiding light and if I couldn't truly justify bringing a given technology into the mix, it'd stay out.
That means that when I built the front end, I would go with plain HTML/CSS/JS... you know, just like I did 20+ years ago... and when I built the back end, I'd minimize the libraries I used as much as possible (though I allowed myself a bit more flexibility on the back end because that seems to be where there's less issues generally). Similarly, any choice I made I wanted to have little to no additional tooling required.
So, given this is a webapp with a Node back-end, I had some decisions to make.
On the back end, I decided to go with Express. Previously, I had written all the server code myself from "first principles", so I effectively built my own version of Express in other words. And you know what? It worked fine! It wasn't particularly hard, the code wasn't especially bad, and it worked. So, I considered re-using that code from the previous iteration, but I ultimately decided that Express brings enough value - more specifically all the middleware available for it - to justify going with it. I also stuck with NeDB for my data storage needs since that was aces all along (though I did switch to nedb-promises instead of writing my own async/await wrapper around it as I had previously done).
What I DIDN'T do though is go with TypeScript. In previous versions, I had. And, hey, it worked fine. TS of course brings some value, but having to have a compile step in it goes against my "as little additional tooling as possible" mantra, and the value it brings I find to be dubious when there's just one developer. As it stands, my "tooling" amounts to a few very simple JS scripts run with NPM. It's very simple, and that was my big goal: simplicity.
On the front end, I of course had to choose a framework first. React is fine, Angular is horrid, Vue, Svelte, others are okay. But I didn't want to bother with any of that because I dislike the level of abstraction they bring. But I also didn't want to be building my own widget library. I've done that before and it takes a lot of time and effort to do it well. So, after looking at many different options, I settled on Webix. I'm a fan of that library because it has a JS-centric approach. There's no JSX-like intermediate format, no build step involved, it's just straight, simple JS, and it's powerful and looks pretty good. Perfect for my needs. For one specific capability I did allow myself to bring in AnimeJS and ThreeJS. That's it though, no other dependencies (well, at first, I was using Axios because it was comfortable, but I've since migrated to plain old fetch). And no Webpack, no bundling at all, in fact. I dynamically load resources, which effectively is code-splitting, and I have some NPM scripts to do minification for a production build, but otherwise the code that runs in the browser is what I actually wrote, unlike using a framework.
So, what's the point of this whole rant?
The point is that I've made more progress in these last few months than I did the previous several years, and the experience has been SO much better!
All the tools and dependencies we tend to use these days, by and large, I think get in the way. Oh, to be sure, they have their own benefits, I'm not denying that... but I'm not at all convinced those benefits outweighs the time lost configuring this tool or that, fixing breakages caused by dependency updates, dealing with obtuse errors spit out by code I didn't write, going from the code in the browser to the actual source code to get anywhere when debugging, parsing crappy documentation, and just generally having the project be so much more complex and difficult to reason about. It's cognitive overload.
I've been doing this professionaly for a LONG time, I've seen so many fads come and go. The one thing I think we've lost along the way is the idea that simplicity leads to the best outcomes, and simplicity doesn't automatically mean you write less code, doesn't mean you cede responsibility for various things to third parties. Those things aren't automatically bad, but they CAN be, and I think more than we realize. We get wrapped up in "what everyone else is doing", we don't stop to question the "best practices", we just blindly follow.
I'm done with that, and my project is better for it! -
Hey DR! I am a pretty inexperienced programmer who's learning about JS. When I was writing vanilla JS to do some simple DOM manipulation, JS seems like a pretty familiar language. However, when I start to learn about different frameworks (React, Express), the way that they code stuff (IDK how to pinpoint specific examples, it's just an overall impression) becomes very different from my experience with other programming language. I am wondering if anyone have any suggestions, have felt the same way, or know how to overcome this phase.
ps This is a general question. Please don't be pissed for lack of technical detail....8 -
I'm really sick of elitist JS/front-end devs acting like these front-end heavy sites are any better than a traditional site using SSR (server-side rendering). Single page apps (SPAs) have 1 large benefit over an app with full page requests: the web dependencies (CSS,JS,etc) don't have to be looked up and downloaded on every page load. With optimized caching headers and HTTP2, this is not a problem. I agree with every point this guy makes: https://blog.usejournal.com/spa-or-...6
-
I'm really not sure. When I was 7-8 years old, I liked to view source in IE, then I somehow managed to use Javascript in the browser. First only some dumb opening of windows. And I liked Batch, so I made some files for copying, backup and stuff.
Then I got to PHP during the years from some online tutorial about making dynamic websites. My website was more static than stone, but yeah, I did page loading with PHP! Awful experience anyway, because I had to install Xampp, get it work and other stuff. 11 years old or so. (and I used Xampp only as a fileserver between laptop and desktop later, because.. PHP4... just no.)
As 12 years old or so I experienced my first World of Warcraft (vanilla) on a custom server in an internet cafe and I thought it's a singleplayer game. When I found out that no, I googled how to make my own server (hated multiplayer back then and loved good games with huge storylines). Failed miserably with ManGOS, got something to work with ArcEMU. There I learned some C++ basic stuff, which I hoped would helped me to fix some bugs. When I opened the code I was like: "Suuure." and left it like that. I learned what a MySQL database is, broke it like four times when I forgot WHERE and still rather played with websites i.e. html, css, js and optionally php when I wanted to repair a webpage for the server. With a friend we managed to get the server work via Hamachi, was fun, the server died too soon. Then I got ManGOS to work, but there wasn't really any interest to make a server anymore, just singleplayer for the lore. (big warcraft fan, don't kick me :D )
I think it was when I was 13y.o. I went to Delphi/Pascal course, which I liked a lot from the beginning, even managed to use my code on old Knoppix via Lazarus(Pascal). At this age I really liked thoae Flash games which were still common to see everywhere. So I downloaded .swfs, opened and tried to understand it. Managed to pull some stuff from it and rewrite in Pascal. Nope, never again that crap.
About the same time I got to Flash files I discovered Java. It was kind of popular back then, so I thought let's give it a try. I liked Flash more. Seriously. I've never seen so much repetitiveness and stupid styling of a code. I had either IDE for compiling C++ or Pascal or notepad! You think I wanted my code kicked all over the place in multiple folders and files? No.
So back to Pascal. I made some apps for my old hobby, was quite satisfied with the result (quiz like app), but it still wasn't the thing. And I really thought I'd like to study CS.
I started to love PHP because of phpBB forums I worked on as 15 y.o. I guess. At the same time I think there was an optional subject at school, again with Pascal. I hated the subject, teacher spoke some kind of gibberish I didn't really understand back then at all and now I find it only as a really stupid explanation of loops and strings.
So I started to hate Pascal subject, but not really the lang itself. Still I wanted something simpler and more portable. Then I got to Python as hm, 17y.o. I think and at the same time to C++ with DevC++. That was time when I was still deciding which lang to choose as my main one (still playing with website, database and js).
Then I decided that learning language from some teacher in a class seriously pisses me off and I don't want to experience it again. I choose Python, but still made some little scripts in C++, which is funny, because Python was considered only as a scripting lang back then.
I haven't really find a cross-platform framework for C++, which would: a) be easy to install b) not require VisualStudio PayForMe 20xy c) have nice license if I managed to make something nice and distribute it. I found Unity3D though, so I played with Blender for models, Audacity for music and C# for code. Only beautiful memories with Unity. I still haven't thought I'm a programmer back then.
For Python however I found Kivy and I was playing with it on a phone for about a year. Still I haven't really know what to do back then, so I thought... I like math, numbers, coding, but I want to avoid studying physics. Economics here I go!
Now I'm in my third year at Uni, should be writing thesis, study hard and what I do? Code like never before, contribute, work on a 3D tutorial and play with Blender. Still I don't really think about myself as a programmer, rather hobby-coder.
So, to answer the question: how did I learn to program? Bashing to shit until it behaved like I desired i.e. try-fail learning. I wouldn't choose a different path.2 -
[DISCLAIMER : Potential Troll Topic here] I am self taught python and js (not considering myself as a real developer as I don't push much on github and work in a complete other field than anything related to CS right now) and would be interested to learn another language, with another paradigm. So, as I love you all, I would be interested In your highlights as I am currently considering either C, C++, Rust or Go.
with C, I know I could interface it with python. With C++ (despite Linus considering it evil) I know I could interface it with Node. I don't know currently what to do with Go, but some people seem really enthusiastic about it (not really relevant I know) and Rust seems like the C of today, with a bunch of new cool kid stuff. My main goal, after all, is to learn something new, to have another sight on programming. Either understanding more about hardware or learning another way of coding (like different from oop).
I know it sounds like a troll, but I promise it's not, just a serious genuine question (hopefully it won't be closed here like on SO)
So what do you think devranters ?
Being eternally grateful to all of you, I wish you a good night.10 -
looks up JavaScript question, gets jQuery answer
Are you kidding me? Does anyone even do plain JS anymore?? D:1 -
I am Graduate student of applied computer science. I am required to select my electives. Now i have to decide between Machine Learning (ML) and Data Visualization. My problem is Machine Learning is very theoretical subject and I have no background in ML in my undergrad. In data visualization, the course is more focused towards D3.js. Due to lack of basic knowledge i am having second thoughts of taking ML. However, this course will be offered in next Fall term. And i am also studying from Coursera to build my background till that time.
I know there is no question here but I need a second opinion from someone experienced. Also, please suggest any other resource that I should look into to build my background in ML.2 -
Now I know Node.js and PHP as well.
Convince me why I should use Node.Js and other frameworks over PHP and related frameworks.6 -
So I have a question regarding what I should learn next. I am going to my 3rd year in college and you can say that I am sort of baby MERN stack developer. Baby because I don't have a lot of production/real world experience. Now I need to decide whether I want to continue to work with JS in web dev. Or should I go to some other language for web dev like . NET or python. Or should I start learning GraphQL, or Machine learning. I am quite interested in blockchain and devops also, but I need to make a decision and please give me advice as to what you think will help me in the future.
I know I am all over the place but that is literally my brain since last few weeks.
Thanks in advance, I'll do a ++ as a form of my thanks.12 -
So, I'm looking into something and end up on Stack Overflow. Someone posted the question:
"Does minified javascript improve performance?"
This question was old as shit, all they way from 07/25/09, and about an Adobe Air application. (Remember that? Me neither...) It had a great, accepted, and still accurate answer, posted the same day the question was asked. Now, fast forward 8 years and on 12/08/17 (A mere 7 months ago...) the following answer was posted. I don't know what they were thinking, but here it is, complete and unabridged, with my comments in square brackets:
"I'd like to post this as a separate answer as it somewhat contrasts the accepted one: [Somewhat contrasts? More like completely contradicts...]
Yes, it does make a performance difference as it reduces parsing time - and that's often the critical thing. For me, it was even just simply linear in the size and I could get it from 12s to 4s parse time by minifying from 3MB to 1MB. [First off, your parse time should NEVER be THE critical thing, but secondly, and more importantly, WHO THE FUCK HAS 1MB OF MINIFIED JS ON A PAGE!!!]
It's not a big app either, it just has a couple of reasonable dependencies. [THERE IS ABSOFUCKINGLUTELY NOTHING REASONABLE ABOUT ANYTHING HE JUST SAID! What dependancies is he using?! You could use minified and not even gzipped jQuery, AngularJS, Vue, Ember, React, AND Dojo libraries on the SAME PAGE, AND have 118k of application code, AND STILL NOT HAVE HIT 1MB QUITE YET!!!]
So the moral of the story here is: Yes, minifying is important for performance - and not because of bandwidth, but because of parsing. [Javascript should NEVER take longer to parse then to download, even on a low powered device...]"
So, yeah, I'm at a loss for what this guy was thinking, but the thought the people like this exist, and that my browser might one day be subjected to their horrific nightmare of code terrifies me...2 -
!rant but question to you experts:
Hey, guys. I'm currently trying to up my game in terms of web development. I already know js, html, php and css quite well (enough to become a tutor at my university) but I'm not shure which frameworks (serverside and clientside) are worth considering. Until now I wrote everything from scratch, which is not very sustainable (waaaay to much code to maintain)
Could you please tell me your softwarestacks, what library to use, which frameworks to learn (Vue/React/Angular/...)? Every opinion is very appreciated and won't go unheard. Thanks in advance.
btw: you guys are the nicest people I ever met online. Thank you for being so awesome.1 -
I need help!
This is gonna be a long question/story.
I'm a Syrian based in Malaysia working as a lead web dev in a good company.
I have a friend in trouble and I want to help him.
Here's a summary:
My friend is a project manager at a gaming studio he happens to be an Iranian atheist with around 2 years of experience in the game making industry.
He worked on and delivered a couple AAA games at his current place of employment as a project manager in one of the teams that made those games.
He stood up for his team when the management was overworking team till after midnight sometimes and forcing them to work on weekends without any tangible compensations ( basically they gave them things like free lunches, movie tickets, etc).
The result of his standing up to his team was the management handing him a notice telling him that he'll be fired within 2 months due to "underperforming".
This was a month and a half ago.
He looked around in Malaysia for a job that can get him a working visa, but his niche background couldn't help.
After his termination in few weeks he can extend his stay at Malaysia for approximately 2 - 3 months.
Now the reason why I mentioned that he's an "Iranian atheist" is the fun part of this story (sarcasm), Iranian government considers him as an "infidel" and he's banned from Iran.
His Iranian passport can't get him anywhere where he can make a living.
So basically he has close to no options.
Now to where I come into all of this:
I want to help him.
I'm going to dedicate my free time for the next 2 - 3 months teaching him web development, the problem is, I don't know how to teach web development in such a short time, in fact I've never taught anyone programming from scratch.
If he can show promising results I know that I can make a case for him get him a position in the company I work for.
I already convinced him today to try and learn web development because I can tell that in Malaysia there's always demand on good web developers.
Now to my request:
how can I best teach web development to someone with no programming background ? I'm thinking about teaching him front end development, so: HTML, CSS/SASS and JavaScript. maybe react js as well if possible ( high demand is usually on React/ Angular front end developers)
Did anyone here teach programming to someone else before?
Did anyone here learn web development in such a short time?
If you've read all this... Thank you :)17 -
To me this is one of the most interesting topics. I always dream about creating the perfect programming class (not aimed at absolute beginners though, in the end there should be some usable software artifact), because I had to teach myself at least half of the skills I need everyday.
The goal of the class, which has at least to be a semester long, is to be able to create industry-ready software projects with a distributed architecture (i.e. client-server).
The important thing is to have a central theme over the whole class. Which means you should go through the software lifecycle at least once.
Let's say the class consists of 10 Units à ~3 hours (with breaks ofc) and takes place once a week, because that is the absolute minimum time to enable the students to do their homework.
1. Project setup, explanation of the whole toolchain. Init repositories, create SSH keys for github/bitbucket, git crash course (provide a cheat sheet).
Create a hello world web app with $framework. Run the web server, let the students poke around with it. Let them push their projects to their repositories.
The remainder of the lesson is for Q&A, technical problems and so on.
Homework: Read the docs of $framework. Do some commits, just alter the HTML & CSS a bit, give them your personal touch.
For the homework, provide a $chat channel/forum/mailing list or whatever for questions where not only the the teacher should help, but also the students help each other.
2. Setup of CI/Build automation. This is one of the hardest parts for the teacher/uni because the university must provide the necessary hardware for it, which costs money. But the students faces when they see that a push to master automatically triggers a build and deploys it to the right place where they can reach it from the web is priceless.
This is one recurring point over the whole course, as there will be more software artifacts beside the web app, which need to be added to the build process. I do not want to go deeper here, whether you use Jenkins, or Travis or whatev and Ansible or Puppet or whatev for automation. You probably have some docker container set up for this, because this is a very tedious task for initial setup, probably way out of proportion. But in the end there needs to be a running web service for every student which they can reach over a personal URL. Depending on the students interest on the topic it may be also better to setup this already before the first class starts and only introduce them to all the concepts in a theory block and do some more coding in the second half.
Homework: Use $framework to extend your web app. Make it a bit more user interactive with buttons, forms or the like. As we still have no backend here, you can output to alert or something.
3. Create a minimal backend with $backendFramework. Only to have something which speaks with the frontend so you can create API calls going back and forth. Also create a DB, relational or not. Discuss DB schema/model and answer student questions.
Homework: Create a form which gets transformed into JSON and sent to the backend, backend stores the user information in the DB and should also provide a query to view the entry.
4. Introduce mobile apps. As it would probably too much to introduce them both to iOS and Android, something like React Native (or whatever the most popular platform-agnostic framework is then) may come in handy. Do the same as with the minimal web app and add the build artifacts to CI. Also talk about getting software to the app/play store (a common question) and signing apps.
Homework: Use the view API call from the backend to show the data on the mobile. Play around with the mobile project to display it in a nice way.
5. Introduction to refactoring (yes, really), if we are really talking about JS here, mention things like typescript, flow, elm, reason and everything with types which compiles to JS. Types make it so much easier to refactor growing codebases and imho everybody should use it.
Flowtype would make it probably easier to get gradually introduced in the already existing codebase (and it plays nice with react native) but I want to be abstract here, so that is just a suggestion (and 100% typed languages such as ELM or Reason have so much nicer errors).
Also discuss other helpful tools like linters, formatters.
Homework: Introduce types to all your API calls and some important functions.
6. Introduction to (unit) tests. Similar as above.
Homework: Write a unit test for your form.
(TBC)4 -
I want to use Babel or Typescript for the first time. Because as I read it is the way to go, when compressing JavaScript and make it browser compatible. If that's false, please correct me.
There's a question I've got about this. Right now I am using a PHP router file dealing with requests and selecting the right .js file and compresses it. So I can write like modular JavaScript functions and include them when needed.
My question is, what do I have to change in my setup to switch to the mentioned technologies?11 -
So i'm visiting the JavaScript bubble every now and then when i'm writing on the userscript i develop to fix bugs in our ticketing system or fix some clients website they negelected. Every time i'm searching for answers to the weird problems that inevitably turn up i have to filter out all the threads that derail with the classic 'google jQuery basic arithmetic plugin' craziness to find an actual vanilla solution to my problem.
All the time i wonder why on earth people put up with this framework hell. This is part serious question and part rant but seriously, how did we come to this? With all that jQuery, React, Node, whatever stuff i'm kinda losing the overview over what's even todays standard. I always try to keep my code as vanilla as possible without using external libraries. But it seems the entire web development industry is heading the completly other way. I tried to look into a few frameworks but i never really see the appeal. Just now i looked up react native because the last 20 rants talked about it and immediately noped out because they fucking create a DOM in js, why the fuck would you do this?!
Worst thing about this framework shithole is that some frameworks are beeing pulled into the mix for very weird and unnecessary reasons. Best example is a charts library i recently used to visualize a database of temperatures that was completely written in native js but pulled jQuery in for the equivalent of window.addEventListener('load',function(stuff)) and i was furious. I rewrote the code and could throw out the jQuery dependency with no problem. What the fuck is wrong with people?
Alright since you made it here: I'm not trying to throw any of you under the bus for using frameworks. I just fail to understand why you would use these. To each their own and unless your site has the performance of the ticketing system i use at work that takes like 15 seconds to load one fucking page i won't complain at all. But pull in a framework just to do a task you can easily do in native js in remotely the same timeframe you are on my list.2 -
Alright, fellow coders, I need your help this time <3
I was thinking about getting a full stack developer position after school, with mean/mern stack. (Yes, I love js, but you can hate me for that later)
So, I just got an offer for a front-end developer position that I didn't apply to but was recommended for by my full stack prof.
Everything is great about that company, but! I'm not sure I'm good for that!
My question is: does being a front-end developer mean being good at putting together nice looking website?
I'm good with angular, but suck at material or just CSS in general.
I can implement business logic, but anything more complex than grids causes my eye to twitch.
So, is front-end developer supposed to be good at design part of it or not?
Google says yes, but I got other opinions from my friends, but they are still students too!
All hope on you guys! Thank you8 -
If you just want to answer my question, skip to the bottom. For those who cares, some backstory:
So...I seemed to have finally caught a break; a friend of my dad owns an IT company and also makes websites...used to. It was becoming too much for him alone so he decided to discontinue, but that's where i come in. We talked a few days ago and it sounds like I'm finally going to have a decent dev related job--even if it's only mainly websites, at least I can work from anywhere once the ball starts rolling since I'll just get direct deposits. Meaning I'd be able to visit my gf in Florida and sustain myself over there while I look to build my own client base or even get a job offer, who knows?
For you guys and gals reading this, what's your favorite/preferred static site generators and css frameworks? I know that I'll be doing mostly static sites first, and i want to deliver quality work as quick as possible. I'm cool with learning a new language once it's not too obscure; i mainly do JS and I know a bit of Python, PHP, and just the basics of Go and Ruby4 -
Career advice question.
I am soon to finish my apprenticeship as an infrastructure technician but about half way through I found my love in coding.
I have played with fundamentals of c#, js, css, python and java.
Where would you guys recommend looking for honing my skills?
Cheers!2 -
Question: We are planning to transition our old ES5 codebase to modern ES6/ES7 and even typescript.
What would be the build tool you would recommend if we want to start supporting ES6/ES7 and even Typescript?
Webpack, Vite some other?
This is a vanilla Javascript Project with large codebase it's been built using custom build tools like UglifyJS and UglifyCSS and of after lots of begging it finally got the green light to move to a more modern build tool and start supporting a more standard JavaScript Features.
Mainly I want to move to TypeScript but transition would be slow so the build tool would need to support .ts and .js as well, that is traspile both the .ts and .js into one final production build.
What build tool would you recommend for that?8 -
TL;DR - I came up with an ingenious version of a solution to a problem and still got 0 marks.
In my bachelor's degree we learned about abstraction, as usual for CS degree students.
In a later exam, a coding question asked us to swap two variables values without using a third variable and print the before and after on the screen.
You can read the question above again, because wait for it....
So this is what I wrote basically (JS equivalent solution),
class Solution {
constructor(obj) {
this.var1 = obj.var1;
this.var2 = obj.var2;
}
swap() {
return {"var1": this.var2, "var2": this.var1};
}
}
let input = {"var1":5, "var2": 7}
let object = new Solution(input);
console.log('Before');
console.log(input);
let solution = object.swap();
console.log('After');
console.log(solution);
Now look, before your boomer asses jump in and say "aCkChUaLlY tHiS iS iNcORrEcT"
I did include all kinds of comments that this is abstracted. The swap function is hidden away and the object variable doesn't need to know what it's doing.
In the context of this question, this is absolutely acceptable as a solution since the end-goal is to print the results on the screen and the user wouldn't see the source code.
I still got 0 on that question and I still get pissed about it sometimes, when I remember it, like just now.16 -
after exploring a lot of ui frameworks and architectures, i am trying to go back to android dev but again with the curiosity for the one single question that i had at the start of my career 5 years back : why is it's ui so complex?
can anyone help me understand it?
like comparing with the most basic ui framework : html/css/js, why android is so different? we got activities, fragments and views. the worst thing in android is lifecycles, that each of these ui components have.
The view lifecycle is simple to get over with : whatever is the lifecycle of its parent, is the lifecycle of view.
a view's parent is another view, whose parent is another view, whose parent is... and so on until we reach the root view which is stored by either a fragment or activity
therefore a view's lifecycle = lifecycle of activity or fragment
till here its very clear. the fuckup is simply in the next part:
WTAF is activity ?WTAF is fragment? why are their various functions called in the sequence they are called? oncreate, on start, onstartview, ondestroy... why?
activity is still somewhat okay, but fragment is completey weird af : it can be a part of activity: basically it can cover your complete screen and behave as an activity itself (so you don't get to say that activity === screen and fragment === view) AND IT HAS ITS OWN FUCKING LIFECYCLES! So does that mean fragment's fucntions cna also be called by OS?
what's more mind fucking, is the fact that android activity can destroy/pause or recreate fragments on its own, by some "views" like viewpager , or even hold multiple fragments as "alive" at the same time, using something called a "backstack" ??!??!
and each of these fragments in the stack can be called by system at any time? like wtf???
all these stuff is super confusing and i haven't even scratched the surface. the newer , more complicated stuff like viewmodel, livedata and again "lifecycles" has a complete seperate behavior and functionality of their own. plus the various "reality-check" scenarios like: when a user is streaming a video in picture-in-picture mode while keeping your app in split screen with maps in the second split, when a call comes and the video keeps running, and user rotates the device, let me know the clusterfuck situation for the 3rd fragment in your 5 icon navigation view currently at the payment page with 2 fragments and 1 activity in backstack!!!
god bless thy soul for this shitty framework isn't going anywhere , rather its super strong and getting more clusterfucked with new beautiful shit everyday.
(if someone can ignore my gentle language, i would really like to know/get redirected to some resources where i can learn more on this)3 -
It's not my intention to start a web technology war so be nice do not do that 😁
Short Info: I'm "desktop programmer" (if that word exists) in either C # or Java 😎
question: I would like to create my own website, just simple to start with and maybe expand it later with eg. Arduino temperature meter
I have a look at 2 programming languages that I can build it in, Js or PHP. I just do not know which one to choose, I'm probably the most to Js, but what are the pros and cons of these 2 and / or is there a completely different programming language I have to take a look at?16 -
Question to the frontend devs: I'm currently trying to optimize part of our JS. How do sourcemaps influence loading/rendering Speed in the Browser?
In the `webpack.config.js` we use uglify as minimizer for js. It has the option `sourceMap` Set to `true`. Now as I understand it, this caused it to Inline a sourcemap inside the JS file (which leads to a slightly bigger file size and thus longer load time for the generated file...).
My Question: should sorcemaps be enabled for prod (minified) files? Why yes, why no? Do they help the browser parse the JS faster?12 -
A bit late.. and not much about how to learn to code..but more of a figuring out if the kid has a right mind set to do so..
If the kid is not the type to question everything, not resourceful, not a logical/critical thinker, gives up easily and especially if not interested in how things work then being a dev is most probably not for them.. they can still persue coding, but it will end badly..
From my experience, people who have a better education than me, but lack those skills turned out to be a crappy dev.. not interested in the best tool to complete the tasks, just making 'something', adding more shit to the already shitty stack.. and being happy with that.. which of course is not the best way to do things around here..or in life!!
Soo.. if the kid shows all that and most importantly shows interest in learning to code.. throw him the java ultimate edition book and see what happens.. joke!
There are plenty of apps thath can get you started (tried mimo, but being devs yourself it's probably not so hard to check some out and weed out the bad ones) that explain simple logic and syntax.. there is w3schools that explains basics quite well and lets you tinker online with js and python..
so maybe show them these and see what happens.. If it will pick their interest, they will soon start to ask the right questions.. and you can go from there..
If the kids are not the 'evil spawns' of already dev parents or don't have crazy dev aunties and uncles, then they will have to work things out themselves or ask friends... or seek help online (the resourceful part comes here).. so google or any flavour of search engines is their friend..
Just hope they don't venture to stack overflow too soon or they will want to kill themselves /* a little joke, but also a bit true.. */
Anyhow, if the kid is exhibiting 'dev traits' it is not even a question how to introduce it to the coding.. they will find a way.. if not, do not force them to learn coding "because it's in and makes you a lot of moneyz"..
As with other things in life, do not force kids to do anything that you think will be best for them.. Point them in direction, show them how it might be fun and usefull, a little nudge in the right direction.. but do not force.. ever!!!
And also another thing to consider.. most of the documentation and code is written in english.. If they are not proficient, they will have a hard time learning, checking docs, finding answers.. so make sure they learn english first!!
Not just for coding, knowing english will help them in life in general. So maaaaybe force them to learn this a bit..
One day my husband came to me and asked me how he can learn.. and if it's too late for him to learn coding.. that he found some app and if I can take a look and tell him what I think, if it is an ok app to learn..
I was both flattered and stumped at the same time..
Explained to him that in my view, he is a bit old to start now, at least to be competitive on the market and to do this for a living, but if it interests him for som personal projects, why not.. you're never too old to start learning and finding a new hobby..
Anyhow, I've pointed out to him that he will have to better his english in order to be able to find the answers to questions and potential problems.. and that I'm happy to help where and when I can, but most of the job will be on him.
So yeah, showed him some tutorials, explained things a bit.. he soon lost interest after a week and was mindblown how I can do this every day..
And I think this is really how you should introduce coding to kids.. show them some easy tutorials, explain simple logic to them.. see how they react.. if they pick it up easily, show them something more advanced.. if they lose interest, let them be.
To sum up:
- check first if they really want to learn this or this is something they're forced to do (if latter everything you say is a waste of everybodys time)
- english is important
- asking questions (& questioning the code) is mandatory so don't be afraid to ask for help
- admitting not knowing something is the first step to learning
- learn to 'google' & weed out the crap
- documentation is your friend
- comments & docs sometimes lie, so use the force (go check the source)
- once you learn the basics its just a matter of language flavour..adjust some logic here, some sintax there..
- if you're stuck with a problem, try to see it from a different angle
- debugging is part of coder life, learn to 'love' it4 -
Question to all JS Frontend Devs: What light and performant library can you recommend me today?
I'm a C++ dev who is a bit anxious about performance, load times etc. and before I stuck my nose into vanilla js, maybe there is something better/faster. I'm a total frontend noob, e.g. I heard that html tables aren't a thing anymore and that I should use divs?
My task is quite simple, I want to give the users the ability to press some buttons and drag and drop stuff around instead of modifying the URL per hand :/
So if someone could point me in the right direction, that would be awesome!16 -
Hello guys. A newbie to the app. I would like to ask - start a conversation with you about adopting new technologies, if should we follow or just wait? I am a PHP developer. I would set myself around mid to senior level. Since I graduated and I start working on a Marketing/Development Company, I have been develop a lot of websites, platforms with pure PHP, JavaScript, SQL. Later I start using framework like laravel. Now I am thinking about JS frameworks such as node, vue, react, angular and maybe later noSQL. The problem is that there are many new technologies that companies required when you apply. I want to learn new technologies but I don't know if that would be helpful than focus on LAMP and get better and better to that. Many orgs have implemented their own technologies and each company is getting mad to it. You see each company adapt these new technologies even if they don't want em or projects required it. So my question is: are we talking about dramatically speed and light use to server when we use new frameworks like these, previous mentione + etc? Or companies are just trying to look cool by mentioning many techologies while projects could never ask for em? (Nothing serious, I am just trying to make conversation and clear my thoughts by getting others opinion)17
-
I made a big project on a personal web site. I send form to people to know the future community.
During one month, make it and a friend tell me :
'' For your big project you can use Laravel or symphony, that's be useful for you, but this is heavy to learn ''.
I tried 2 days and stop it...
This is so different... But that could be very cool to know it, I think...
I have a question for you :
Does I have to continue learn it? This is very important to know it?
Ps: I programm in php/pdo and mysql ans some js4 -
This is a part rant-part question.
So a little backstory first:
I work in a small company (5 including me) which is mostly into consultation (we have many tech partners where we either resell their products or if there is a requirement from one of our clients, we get our partners to develop it for them and fulfill the client requirements) so as you can see there is a lot of external dependencies. I act as a one-hat-fits-all tech guy, handling the company websites, social media channels, technical documentation, tech support, quicks POCs (so anything to do with anything technical, I handle them). I am a bit fed up now, since the CEO expects me to do some absurd shit (and sometimes micro manages me, like WTF I am the only one who works there with 100% commitment) and expects me to deliver them by yesterday.
So anyway long story short, our CEO finally had the brains to understand that we should start having our own product (which i had been subtly suggesting him to do for a while now!).
Now he came up with a fairly workable concept that would have good market reach (i atleast give him credits for that) and he wanted me to suggest the best way to move forward (from a both business and technical point of view). The concept is to have an auction-based platform for users to buy everyday products.
I suggested we build a web app as opposed to a mobile one (which is obvious, since i didnt want to develop a seperate website and a mobile app, and anyway just because we can doesnt mean we have to make a mobile app for everything), and recommended the Node/react based JS tech stack to build it.
At first he wanted me to single handedly build the whole platform within a month, I almost flipped (but me being me) then somehow calmed down and finally was able to explain him how complicated it was to single-handedly build a platform of such complexity (especially given my limited experience; did I mention that this is my first job and I am still in college, yeah!!) and convinced him to get an experienced back-end dev and another dev to help me with it.
Now comes the problem, I was to prepare a scope document outlining all the business and technical requirements of the project along with a tentative cost, which was fairly straightforward. I am currently stuck at deciding the server requirements and the system architecture for the proposed solution (I am thinking of either going with AWS - which looks a bit complicated to setup - or go with either Digital Ocean or Heroku):
I have assumed that at peak times we would have around 500-1000 users concurrently
And a daily userbase of 1000 users (atleast for the first few months of the platform running)
What would be the best way forward guys?
I did some extensive (i mean i read through some medium blogs! and aws documentation) research and put together the following specs (if we are going through AWS):
One AWS t3.medium ec2 instance for the node server (two if we want High Availability by coupling with the AWS load balancer and Elastic Beanstalk)
The db.t3.small postgres database
The S3 Storage bucket (100gb) for the React Front end hosting
AWS SNS for email/sms OTP and notification
And AWS CloudMonitor for logging amd monitoring.
Am I speculating the requirements properly, where have I missed??
Can u guys suggest what is the best specification for such a requirement (how do you guys decide what plan to go with)?
Any suggestions, corrections, advices are welcome3 -
Disclaimer: I should know what I'm doing but I don't. 😢
I'm a very experienced full stack dev (15+ years), but I don't know the more modern JS frameworks. I'm trying to learn React and I have a little project I'd like to do.
I have database (in both SQLite form and JSON form). I'd like to read from it, parse it and run various displays in a shared hosting environment (that doesn't have node). So webpack. And either an API to get the data or a React compatible SQL component.
But dagnamit, I cannot find a tutorial or example with this kind of set up and I can't figure it out. What packages do I need and what kind of config?
I genuinely thought this would be a traditional and simple architecture but I'm obviously mistaken. And I'm about to turn in my developer card because I'm clearly a stupid twonk.
Has anyone done this? Do you know of any tutorials or examples of this kind of thing? Is there somewhere else I should ask this question? Thanks anyway...5 -
Here we go. GDPR(?) again.
Don't know where to ask this kind of stuff, SO is prolly too much and from my experience, you guys here always gave the best answers to stuff..
I'm currently working on a website as a project for finals (it's called Maturita/SOČ here :/) and it's supposed to be a dasboard where teachers can add some info about upcoming stuff and shit like that. Few things: No frameworks, just JS, PWA and Firebase. I've been hearing a lot of stuff about GDPR that I should comply with it and so on.
Here's the question: It's PWA and the data is currently stored in localStorage and planning to sync it to Firebase. What I store is name of the school, few URLs they enter in and the information they provide, like the upcoming events and such. Should I worry about GDPR in this case, and if so, what can I do?11 -
If a team uses multiple languages and stacks (Have, JS, Python) do you think it's better to have everyone use/constantly switch between them or have dedicated developers for each language (ie. 80% main, 20% others)?
--END QUESTION, ANSWER NOW BEFOREHAND CONTINUING---
---BEGIN RANT---
My boss likes keeping the team "will rounded" so everyone does everything. One month in working in Java, the next with Node web apps. When I switch to node, it takes like a week of "wtf doesn't it work.... what changed, is it a big?" And usually end it"oh right I remember I need to ..."
And also always... "How the fuck do I write tests in {some reading framework} again?"
So feels like everyone is just a generalist and no one is a master/has time to develop mastery. I don't know if it's just me (1/3 Senior developers on the team that has to do everything) or if I'm the only one that complains... Not that it makes a difference... (Only option to really be heard is to resign but I need to somewhere else to work and finding one is hard for personal reasons)
And well this is the biggest reason I would leave the team. No time for mastery, no standardization/shared knowledge (everyone does their own thing but probably not well and no time for testing or documentation; how the fuck does whatever you wrote work, how do we use it, what the fuck did you put in prod that does ... And where the fuck did you put it cuz it's not in ANY of our repos).
I always feel one day soon it will come crashing down and I can say "I told you so" but will then it's too late and I'll be there one cleaning it up... Again6 -
So at the HS I go to, there are 4~5 programmers (only 3 real "experienced" ones though including me).
So coming from JS & Python, I hate Java (especially for robotics) and prefer C++ (through some basic tutorials).
Programmer Nº2 is great at everything, loves Objective-C, Swift, Python, and to a certain extent Java.
Programmer Nº3 loves Python and used to do lots of C#, dislikes Java and appreciates Go (not much experience).
So naturally I get shit on (playfully) because of my JS background, because they don't understand many aspects of it. They hate the DOM manipulation (which is dislike too tbh), but especially OOP in JS, string/int manipulation, certain methods and HOISTING.
So, IDK if Java or C++ (super limited in them) have hoisting, but if you don't know what hoisting is, it means that you can define a variable, use it before assigning a value, and the code will still run. It also means that you can use a variable before defining it and assigning a value to it.
So in JS you can define a variable, assign no value to it, use it in a function for instance, and then assign a value after calling the function, like so:
var y;
function hi(x) {
console.log(y + " " + x);
y = "hi";
}
hi("bob");
output: undefined bob
And, as said before, you can use a variable before defining it - without causing any errors.
Since I can barely express myself, here is an example:
JS code:
function hi(x) {
console.log(y + " " + x);
var y = "hi";
}
hi("bob");
output: undefined bob
So my friends are like: WTF?? Doesn't that produce an Error of some sort?
- Well no kiddo, it might not make sense to you, and you can trash talk JS and its architecture all you want, but this somehow, sometimes IS useful.
No real point/punchline to this story, but it makes me laugh (internally), and since I really want to say it and my family is shit with computers, I posted it here.
I know many of you hate JS BTW, so I'm prepared to get trashed/downvoted back to the Earth's crust like a StackOverflow question.6 -
Me : .. but sir without sass/js compiled, how can we address the issue?
Boss : that is not an issue, issue is with on approach we have taken?
You sick fuck, you take other developers un-finished work, expect me to finish it (which it did) and when the other developer is not smart enough to copy paste the solution, you give an "update" to me, I mean how the fuck, what ever..
I really really put efforts to make this shit happen, I know very little about your commerce cloud shit, but when you question my logic on basis of someone who will pay you to finish her work, it is very unethical and hard to swallow it down.
Maybe this is my first real job, that is why this is so hard, but I gotta do what I gotta do -
Random thoughts on more out of the box tools/environments.
Subject: Pharo
Some time ago I had shown one of my coworkers about Pharo and he quickly got the main idea behind it but mentioned how he didn't like the idea of leaving behind his text editor to deal with source code.
Some time last week I showed the dude some cool 3d animations you can do with Pharo while simultaneously manipulating the code to change them in real time. Now that caught his attention particularly and he decided he wanted to know more about the language but in particular the benefits of fucking around with an image based environment rather than a file based.
Both of us reached the conclusion that image based makes file based dev enviroments seem quaint in comparison, but estimated that it was nothing more than a sentiment rather than a fact.
We then considered what could be the advantage/disadvantages of such environments but I couldn't come up with anything other than the system not having something like Vim or VS Code or whatever which people love, but that it makes up for it with some of the craziest IDE tools I had ever seen. Plugins in this case act like source code repos that you can download and activate into your workflow in what feels something similar to VS Code being extended via plugins written in JS, and since the GUI is maleable as it is(because everything is basically just subsets of morp h windows) then extending functionality becomes so intuitive that its funny
Whereas with Emacs(for example) you have to really grind your gears with Elisp or Vimscript in Vim etc etc, with Pharo your plugin system is basicall you just adding classes that will convert your OS looking IDE into something else.
Because of how light the vm machine is, portability is a non issue, and passing pharo programs arround is not like installing Java in which you need the JVM.
Source code versioning, very important, already integrated into every live environment and can be extended to do pushes through simple key bindings with no hassle.
I dunno, I just feel that the tool is too good to be true. I keep trying to push limits into it but thus far I have found: data visualization and image modeling to work fine, web development with Teapot to be a cakewalk and work fine, therr are even packages for Arduino development.
I think its biggest con would be the image based system, but would really need to look into how this is bad by any reason other than "aww man I want vim!" since apparently some psychos already made Emacs and VS code packages for interfacing with Pharo source trees.
Embedded is certainly out of the question for any real project since its garbage collected and not the most performant cookie in the jar.
For Data science I can see some future, seems just as intuitive and interesting as a Jupyter Notebook actually, but the process can't and will not be the same since I still don't know of a way to save playground snippets unless you literally create classes for it, in which case every model you build gets saved inside of an object, sounds possible but, strange since it is not a the most common workflow in jupyter.
Some of the environment is sometimes glitchy, but it does have continuos development and have not found many hassles.
There is a biased factor from my side: I seem to be wired to understand the syntax and simple object model better than in other languages. To me this feels natural as if I was just writing ideas rather than code, mostly because I feel that there really ain't much in terms of syntax, the language gets out of my way and the IDE feels like the most intuitive environment in the world to me. I can see why some people would find it REALLY weird of counterintuitive tho.
Guess I really am a simple dude. -
All the C# developers will get this. I’m a C# developer myself. When I go on GitHub, all of the c# GitHub wikis, comments, and issues are very professionally written, even the amateur comments are worded like a stackoverflow question. It’s great.
I stumbled across a popular JS GitHub repo (https://github.com/tessalt/...) and reading the comments made me so happy to be a developer of enterprise level languages with structure, patterns and conformity.
Sure JS has all these things, but JS also has a boatload of “self taught” (I’m self taught too) developers with no patterns, no sense of scalability, or systems integrations, or sense of how to write meaningful comments and discussions44 -
Hey guys, could I ask you to upvote my question on stackoverflow or take a look and help me solve this if you can, I'm stuck with this problem for one week : https://stackoverflow.com/questions...
I would really appreciate it7 -
Hi fellow devs, I have a question for you.
Do you think asking questions like (related to JS):
- What is the type of null?
- What is the result of 0,1 + 0,2 (0,30004)
- and other JS specifics
in a job Interview for a Junior position is the right thing to sort out applicants?
I have several years of programming experience, just not in JS, and got rejected because I couldn’t answer these questions. Feels kinda weird😅 What’s your opinion?24 -
I've tampered JavaScript for about 2 months now and I like it. But I see that there's a lot of hate towards JavaScript on devRant (and other websites). Why do people hate/dislike JavaScript so much? Or is it just a personal preference?11
-
Quick javascript question:
let a = .............
Make a == a always return false.
What would a be? One solution is to let a = NaN. Anything fancier? :>4 -
What do you do when you have to deal with ancien minified js and no dev version left ? seriously , its a legit question ..7
-
I'm about to ask a really, lets just say challenging, question.
I'm well aware that PHP is server side and JS is client side. Don't worry, i'm not as dumb as I look, but I've taken interest in the formerly known as phpjs.org project now known as Locutus. (Love their name and idea.)
My question is whether anyone has used any little bit of that project, and if so, can you use it for something like Wordpress or Joomla to have a purely serverless and dynamic website? I know. I know. Dumb. I'm just curious because the idea intrigues me more than anything to have something like that.4 -
<Question>
I'm curious: For those of you who have tests running in CI pipelines at work:
How long does it take to run the tests, in relation to the system's size?
At my company, it's ~ 30 mins, testing 1M lines of code (750k SLOC) written in Java (85%) and JS (15%).7 -
Some had teased me a bit on my previous meme so let me tell my anecdote...
I have to tell you a rather funny anecdote that happened to me during a job interview..
To put you in context, I am a front/back developer and the language where I perform best is JS. I started learning JS at an early age during an open source project to make animations on websites then I also quickly moved to the backend using NodeJS. I gained a lot of experience by going to small start-ups and this time if I wanted to try my luck on big companies in the field of video games.
So I wanted to present some projects to my interlocutor who seemed to be someone with an important position in the company, about 26 years old and we talked about the JS language. I showed him all my projects including those where I was doing free/open source and also in the field of video games such as volunteering like the back off https://mylolmmr.com And suddenly he called out to me and said "JS is not a real language".
I must confess that I was quite disturbed by his assertion and did not understand his condescension or his belittlement. This mind...
Especially since I find it extremely misleading to say that the JS language is not a real language when you know its advantages and disadvantages, but I did not dare to express myself on this subject and we continued the interviews, even though he saw that it bothered me.
The funny thing is that once the interview is over and I decide to go home and I receive a call from the company in question who wanted me to take a technical test telling me that the oral interview was successful...
I reassure you right away, I refused.. For a question of salary which was extremely low and obviously the bad experience with this famous director.3 -
Question:
My application (web app & mobile app) needs to interface with a users email to read mails for further processing
Is there are library (py, js) or service that I can leverage that abstracts the access to the mail servers (IMAP, POP3, Exchange, Google API, Outlook API etc.) and provides a single interface (possibly REST API) to access the mails?
It feels redundant to implement each of the above methods of email access, as I see it being a feature in many applications out there, but I am not able to find a library or service that provides it.
Any advice or suggestions with implementing each of them is also welcomed
Thanks in advance1 -
C++ or Python for coding interviews?
I used to do a lot of developments in Python and JS/TS. But now I have been doing a lot of back-end stuff in Golang at work (1+ year) and C++ for some of my side projects. So when I started grinding leetcode, I used C++ all the way.
Today this question struck me and I keep thinking if I should continue with C++ or use Python, which will help me focus more on the question than the language.5 -
Is there actually any frontend framework or boilerplate to just code and avoid messing around with old libraries, missing dependencies, no documentation? I'm seriously moving to plain ES6, it feels more flexible :/1
-
!rant
Frontend people, I need your opinion.
I will soon start building the next version of a rather large project's frontend but I am mostly a backend guy.
It is a custom made web application (PHP, Postgres) that handles all business aspects of a shipping company of about 50 people (trucks, truck free space in shipments for new packages, package tracking via gps on the truck, invoicing, reselling shipping services to other businesses, everything).
The existing frontend is using an ancient version (1.x) of the YUI framework and uses AJAX heavily to refresh the user interface. It's usable, but maintaining and extending it is getting really hard as the project grows larger and larger and more systems are integrated.
So the question is, given this use case, what JS framework do I use and what is a good resource to start learning it?5 -
This is just me throwing out my thoughts from the past few weeks.
edit: this is long
> Working on a C# project. its going well Its teaching me a lot about SQLite and file IO. I'm having a lot of fun with it, even the debugging as much I want to slam my head on the wall but I'm not asking for help so far and I'm very proud of myself because it feels so much better. like I don't mind asking for help but its so much more rewarding and I learn more from it.
> I need portfolio of software I can show off to employers and the current project I'm working on is the first programs in the portfolio. The place I want to apply to uses C#, but I still wanted a few other programs in other languages such as Python or JS just to show what I'm capable of.
> I was looking at what ASP.NET Core offers and it impresses the fuck out of me, and confuses me. The parts that confuse me, like for example the normal asp webapp is a very impressive hello world app. and it has so many different files and such but how or what do they expect me to add? how am I supposed to work with it? and if I delete any files I don't need (the premade js, bootstrap, jquery, html, and css) it produces errors because of the project files are pointing to those. and i know I can use the empty project (I do) but does that question my ability as a dev since I don't want to use it for my projects?
> On that note I love using Intellisense and debuggers and auto complete and I can go without them I just don't want to rely on them. idk I've just been a little more stressed these past few weeks.4 -
I'm leaving my company and my boss assigned me some tasks, so is it necessary to complete all those task to get experience letter? If I can't then do I have to work extra days to finish it?7
-
I love JS. And then this things happen... I want to learn TypeScript so much (not really related as I don't know if it avoids this).
Btw, I ended up finding ++n works too, so in the end it was 'Question '+ ++n;7 -
Hello council of elders.. or should I say "console"? Heh? Heh? I've been up for a long time sorry.
Anyway. I've started learning framework stuff. Angular right now. Been long overdue tbh. And I found a free course on udemy and followed it. It's cool and everything but I gotta ask...
Why can't I just use vanilla js and everything from scratch? I'm not sure if its the course I'm using (I'd appreciate more resources. Thanks) but I feel like it's a lot of effort. Is there something I'm missing or haven't learned yet?
It might sound stupid please let me know why it's better to use that than regular methods. Apparently it's meant to make stuff easier but I feel like it's just a lot linking files and making various things in different places.
Also. Other stupid question which might just be cause of the course but like... Is it mostly just for manipulating json??
Thanks. More questions to come soon!!3 -
Question:
Should I make my own JS library/framework to make my work go faster, I would put the most used code in this library2 -
Every semester at my university I must grade my teachers with a poll of about 30 questions and 5 choices each with 1 question beign a negative one.
So I looked at the HTML and made a small JS script to fill out the poll with semi-random choices and adding the exception for that one particular question.7 -
So here is the question.
Am a CS student and interested in app development languages like C++ and C#. And leaning a lot about those languages and practicing.
Today in our class some member from **** company came and they told us that are going to arrange a 2 days workshop for php, JS, Ajax, HTML and CSS languages. After that they are going to offer a internship also. 😃
So should I go or not?
Intrested in app development but still wanted to have knowledge about web. Really confused on what to do! 😕😕😕8 -
Question..
Is it safe to stay with PHP or do you think js (in backend) is the future?
Php (laravel,..)
Js ( Angular, react,..)14 -
question to the web devs around. What is up with all these js frameworks these days ? backbonejs rxjs moustache js reactjs angular js knockout js ... do you guys wake up and decide to make another framework or is there a reason behind ALL of them ????9
-
After working 48 hours with d3.js library and withing hundred times :
g.append("g")
a question arise:
Is this library developed by woman?
Is there a relation between G-spot and d3.js?2 -
Hey guys I've a question that's been on my mind for a little bit. I recently got my first full time dev job as a junior developer. Overall I'm really happy with the opportunity to work in the industry, but in the company we're using old technology ext js and PL/SQL. I'm wondering will this make things harder when looking for other jobs in the future that use more modern frameworks, or is it that the actual industry experience is more important?8
-
prediction question: how long do you think until JavaScript goes away, and what language do you think will replace it as the de facto web language? I know Dart is aiming to fill that niche, as well as even Kotlin/JS and/or Kotlin/WebAssembly7
-
This is not a rant. Rather just a question or an ask for advice, as I have seen a lot of people talk about web development around here. I am planning to create a website for my search engine. I created a Rest API for my VPS so I can do http requests and retrieve some links for certain key words. But I need some good ideas to do this from a website. As I am not sure what would be the best way to do http requests. As far as I know it's possible with Js and PHP, but I am not sure what's better, more secure or convenient? So here I am to ask you guys, especially those who have experience with this, what I should consider to do.
Oh and please forgive me my limited knowledge about Js and PHP 😅😊3 -
Question to the freelancers here.
How long did it take you to make a living with freelancing and did you start freelancing fulltime right away or 20-40% besides another job?
I'm thinking about freelancing for a while now, but I guess in the beginning the money coming in will be really unpredictable, right?
About me, I'd call myself a senior level developer (Java, JS, SQL and stuff like that). -
i am a B.Tech 3rd year student.Last month i started learning Php web development,also learnt HTML &CSS.
i struggled during the starting days but became quite comfortable with back-end development using Php,MySQLi, and JS.
But my concern is my Placements. I have seen students getting hired by top IT companies on the basis of their ranking in COMPETITIVE PROGRAMMING like codechef,hakerrank etc.
My question is that should i continue doing Web Development or should i invest time in competitive programming and stop doing web development?5 -
Hey! Just curious, is it normal that a technical test/challenge takes me more than a day to do?
I have been interviewed for a front-end role, and was given a react challenge. They said that it shouldn't take more than 2 hours ('hopefully' is what they added at the end). But i've been doing this challenge for a day now and it's only 60-70% done.
It's not complicated, and I do know how to do it, and, even, do it properly, it just takes a lot of time for me to code, i.e. develop components, change webpack when needed, read react materialize-ui (css framework) docs, then destructure json response from the api they provided and put this information on a page, then try to compile to the right format (they want single .html element with inline js and css as a deliverable).
So my question is, am I shit or is it unreasonable for a company to ask do so much coding or a little bit of both?
What's your experience usually when looking for a job in 'hip' and 'cool' startups?4 -
Background: We switched from just simple old PHP and JS using notepad++ to PHPStorm and its infinite configurables, Symfony 4, Twig, Composer, Doctrine, Yarn, NPM, Bootstrap, ( thank the stars we didn't try to add Docker in with all this ), any other junk I'm missing here? Then upgraded to Symfony 5.
Symfony's autowiring: madness behind the curtains. I get frustrated about when and where I can just magically inject these dependencies or use config variables, you know, like the ones you define in service.yaml. Hmmm, "service".yaml. In a controller you can say getParameter() but in a service you have to inject the parameter, FROM THE "SERVICE".yaml!!! Autowiring drives me nuts. Ok, so we can supply dependencies using the constructor, that's great! Within a controller you never have to instantiate the object you're passing to the constructor (autowiring handles that). That's cool, weird when we you try to trace it for the first few times, but nice I guess. Feels like half-assin' it. What bugs me here is that it only works in controllers... I guess out of the box.. i'm not even sure. To get that feature to work for services you have to make some yaml edits. Right?Maybe? Some of the Symfony tutorials have you code up some junk then trash it. Change config then wipe that out and do X instead... so I have no idea what "out of the box" for Symfony really is.
Found this cool article that describes my frustrations in better terms and seems like a good resource to learn about autowiring. I need to continue my yaml wizardry classes. https://alanstorm.com/symfony-autow...
.....And on to YAMLs, or CSS, or JS or any other friggin' change you make to a file anywhere... Make a change, reload page, nothing... nope you have to do some hidden cheat combo of yarn dostuff -> cache:clear -> cache:warmup -> cache:cache:the:cache ... I really really hate this crap. Maybe I'm too old school for all this junk. It was simple with pure PHP. Edit code, push file, reload page, and oh look it changed! Done. So happy! Ok, Ok. Occasionally the js or css might get cached by the browser and you have to ctrl/f5 or Shift/f5 .. one of those. With this framework there's just so much more that you have to remember to do get some new feature of your site loaded.
Now, I totally get wanting to use some type of entity framework, but I feel like my entire world turned backwards. Designing tables using something like MySQL Workbench made sense. I can see all the columns and datatypes right there as i'm building them. From what I've experienced now with Symfony/Doctrine is you have to make and entity, get a shit-ton of question lobbed at you and if it's a relation field you have to really have a clear idea of the cardinality up front. Then we migrate that to the database. Carefully read through the SQL if you really really just want to use migrations:migrate in Prod. That alter table could cost you some some downtime if your table is large.
Some days man.... -
NEED AN URGENT HELP HERE!!!
As much as I try to stay away from the satanic language that is javascript, I have to read up on it if I need to pass this semester.
Guide me towards the different types of objects in javascript, anyone?
Here's what I know so far- js treats everything as an object, but what I don't know is that are there categories? [the "everything" referring to the primitive data types]14 -
Compiler Question
Things you hate/don't like about JS/Javascript/ECMAscript/ES. Or what do you think are the issues4 -
!question+rant
So, I was call to be phone-interviewed at a company that I kinda liked.
They were looking for a full-stack developer.
I'm more of a back-end but I'm not blind to some front-end things, but I'm not expert to any front-end framework or technology.
I'm pretty good with Java and Python, and have 8+ years of experience.
The thing is, they were looking someone like me BUT also with React and JS knowledge. So it was a bye bye for me.
That made me start thinking: Should I start learning a framework and become a full-stack developer?
Which framework would be a good one to start with?
(I've made a couple of native Android apps, and once I tried to learn React-Native but I couldn't last more than two weeks with it).7 -
Hi all. I just have a quick question. Why is Wordpress so hated in the web development community? Is it not considered "real@ development? As someone who is decent in HTML and CSS, should I use Wordpress to make websites or just stick to HTML and CSS (trying to learn JS at the moment)14
-
[ WEBDEV frontend QUESTION ]
I will need to build a new admin dashboard for representing a lot of data from the api. the API is written in PHP and this won't change. We are currently using jquery to make the data interactive (choose date ranges, different filters and so on). Were currently using morris.js for charts. I'm thinking this would be a good opportunity to learn and use a new js framework to make the data more easily bindable on buttons and selects (not so many listeners on buttons and shit like that).I will be developing the front end on my own, alone, so i mostly have freedom here. I need something that has implementations of chart rendering, and which I could learn in a week or two in the evenings after work (starting to work on this in the next week probably). What are your guys recommendation? Whats the best option for dashboards js wise? I was thinking vue, won't I shoot myself in the foot for using a new technology(for me anyway) right from the bat?2 -
Cross post from /r/cscareerquestions
Hey guys how are you all doing!?
I got into university this September (Computer Engineering & Informatics).
Although I've been programming java since I was 14 (github.com/zarkopafilis), discussions with a friend who is a dot net guy and has been working full-time C# for 2 years now got me thinking.
Alright, Java's good. I've learned to love and hate the language. I also like Spring Boot and whole this ecosystem of stuff including Scala and the other Java based languages. Currently I'm in the proccess of completing some personal project of mine.
Alright, here's the big question: Assuming I am going to graduate (and start working) in 5-7-8 years (Masters, PhD - who knows), which language would you suggest I stick with and start learning? - for backend programming of course.
Don't tell me JavaScript. Although I don't like it I've digested the fact that I'll have to learn some of it for sure.
Currently that's what I'm thinking: Invest some more time learning how the JVM works (and probably keep improving my code quality). Also learn some more stuff regarding Spring Boot (and/or Web Services in general). Then advance onto Scala till couple of years pass. In that time I shall keep improving my SQL skills.
On the other hand I may start learning C# along with .NETcore .
Sidenote: Personally I prefer statically typed languages, that's why I dislike stuff like js and python although I occasionally find myself fiddling with small projects like some laser tracker written with python + opencv.
Sorry if this reads like a big disorganized dump of thoughts. Thanks in advance! :)3 -
since universe is expanding.
what was there in it before our universe reached there.
I think JS can answer this question.
it was 'undefined`
once our universe reaches there it becomes null.
its still nothing but no longer 'undefined'.10 -
Coz a question like this in SO will get me banned......
I know HTML, CSS, JS, React in frontend.
I know Java as backend including database connectivity and all.
Should i learn a more demanding backend language lile PHP?
Or should I further learn frontend technologies like Angular, D3.js, and other frameworks?15 -
Last Saturday, I came across a fellow techie at a house party. As soon as he found out I am a developer, the question
"What is your favorite programming language?"
came bursting not even a nano-second after I told him.
Anyone else finds this super cringe?
I believe that people who dig deep trenches in such a topic will be the root cause for the next software crisis. I mean, look at Javascript. In one of my later posts, literally noone could give me a reason to not think Javascript is a dumpster fire. And yet it spread out like a malignant tumor.
To verify not all is lost, I quickly googled any databases written in JS, and luckily just found one archived repo and nothing else. Because Im calling it, once Javascript reaches the database layer, it's terminal.4 -
I am the only front end developer in my team, used to be 2, and there is 4 java backend dev. We are all Seniors, so you'd expect to be experienced. I like my code to be "nice" and I am using linting tools, rules, formatting etc... (I do JS mainly).
During a scrum review some of the java guys showed some code on the screen and that thing was a monstrosity for me! I could not look at some code like that, if I had to work with that I'd probably hang myself. Nothing was aligned, no consistency. So my question: you guys aren't using any guidelines to have cleaner code ? How do you make sure you all code the same ?
...
What are you taking about ? We use Eclipse, with default options, no tools no guidelines...1 -
Quick question to you guys and gals,
I really want to become an iOS app developer. I know it would be long and painful way to learn Objective-C (some say it looks like alien language compared to C). Swift is rather new, much easier to learn, but I know Objective-C is a must to be considered as true iOS dev.
The question is: is there such a need of iOS developers (I mean UK/Canada/US/Germany)?. I live in Poland and there's not much to do in iOS development (few job offers, everybody is hyped by JS and frameworks changing every year, some offers are often underpayed remote work for foreign clients). I am now 20 years old, still learning at Uni and not having any responsibilities, so I may go someday to UK for a year or two, since the market for iOS devs is more diversed and bigger than in Poland. I know I am complaining (most Poles do that), but I've learned English since I was 4 and it's a pity not to use it as a resource to get a better job offer than in my mother country.
Thanks for all the responses, especially from people working as iOS devs3 -
tldr: I am looking for recommendations for a basic website for my parents. GOTO question;
Pre-Story:
My parents have a small (offline) business. They have a website to give some general information and list their weekly offers.
When I felt that what has come out of the website-building tool (you know, clicky clicky stuff) looked a bit too early 2000's and is a total ripoff for what you get (almost 20€ per month), I created something with Google Sites for them. Feel free to roast me, but web development is not my field and now it looks much more modern, is mobile friendly and does what it is supposed to do. Weekly offers are edited in a google sheets file, which is embedded in the website. Not great, but this way my mom doesn't have to deal with editing a tables on the page - trust me, it won't look good. This also meant they could downgrade the hosting package to discard the clicky-tool and just the domain (maybe 1€ per month). The website itself is hosted for free by Google.
Some time ago GDPR became a thing and then I was tasked to have a look at it. (side note: I don't want to rant about being responsible for it, that's fine. My parents don't really ask me to do a lot for them.) You can't enter any data on the website, it's just very basic stuff and data protection wise there's just the "usual" stuff (cookies, embedded tools, logs). I added another site with a halfway complete privacy policy. Regarding the whole cookie issue (do not enforce unnecessary cookies) I couldn't find an easy solution. It's not 100%, but what can you really expect from a small business like this? I've seen worse.
Now to the question:
Can you recommend a good alternative to the current solution (Google Sites)?
It should be cheap (<3€/month incl. domain) and my parents should be able to make some basic changes (just text in predefined locations). I am not afraid to get my hands dirty - I can deal with some HTML, CSS, JS - but I don't want to sink a lot of time into this. No need for analytics or the like. Maybe a newsletter would be cool (with the weekly offers), but that's just a random thought of mine and definitely not necessary.
Thanks for reading :)18 -
So I'm new to NestJS, Node, etc. and I just noticed that the guy working on the API made every request call a different service class, instead of using a single service class. For example.
get() {
return await this.getObj.run()
}
post(myDto){
return await this.storeObj.run()
}
update(myDtoUpdate){
return await this.updateObj.run()
}
And I'm not sure why. He's also injecting the request into those classes, instead of passing the DTO to the method call. I mean, it's still injecting the data into it I guess, but it seems so roundabout. Something like this:
public constructor(
@Inject(REQUEST) private request: Request,
){}
I'm scared, but I'm not sure if it's just my own ignorance or a sixth sense telling me that this is gonna be a mess.
Have you seen APIs implemented this way? I can see the benefit of dividing the code into smaller classes, but it just seems overkill to me, specially when there's a big chance that code will be repeated (getting an entity by ID when updating it, for example).
I'm still in time to kill this with fire before a new monster is born though, so that's something.1 -
JS/HTML QUESTION:
I wanna create a html page wich redirect us into a certain website and execute Javascript on the new website opened.
So i should use window.open i think, but how do i like execute js on this website after opened?7 -
[long confession/question]
So I was asked by a client to make an app similar to prisma(not exactly that but let's say a caricature app) and I knew I have to research a lot.
Now I have been loyal to PHP for over 5 years so I first tried with GD and imagick but the results were not very good, so I thought let's try opencv. I didn’t wanna make any compromises so I didn't go the bridging way, I worked on native python even though I am a newbie in it. I was fairly impressed with the cartoonizing results but others weren't. Soon I got to know that this would take much more than simple filter combinations or matrix manipulations.
I read about prisma and got to know it uses deep neural networks for the same.
Now, in the five years I have learnt almost all the things a run-of-the-mill "Full stack Web Developer" should know.
I have a fair knowledge of PHP, many of its frameworks, many js frameworks(obviously jquery), I have a very good understanding of CSS and its models, I have worked on some cool algos and found solutions to many problems but I haven't gotten to stage where I can implement neural networks/machine learning in my projects.
It just scares me.
___
A little back story: I have been the CTO of a small scale company for about 1.5 years now.
___
So all this got me to asking myself should I just step down from the post to a position where I can learn more skills. Managing takes a lot more time where I can't learn a lot. Sure I learnt some other important things but not as much tech knowledge as I would have in a more basic position.
I know not many of you must have read this far, but if you did what do you think I should do? Really depressed at the moment.5 -
Doing node dev with a friend that never used JS before
He asks about how to make enums for our generic model to use
Good question I think, I'm not sure
Apparently you just make a fucking object and freeze it, go figure with JS
"Wow. I bet that's super fast /s"
Dammit JS you patchwork ass language, I love you but I see why classic language developers are turned off2 -
I'll try to make this short:D
I'm a CS student atm. at 3 sem.
And I just wanted to ask you guys, how did you improve back when you started developing?
The assignments we get at school never really challenge me, so I've spent a lot of time doing "programming ideas"(from sub reddits and ideabag2) on the side.
But I feel like I've hit a brick wall, as in, I don't think I learn super much from them anymore.
Which is why I've tried to "help" others, but when I go onto stack overflow or try to help on open source projects, I understand nothing and I'm definitely not able to help with anything. (They're all about things/subjects I've never heard of before)
So my question is mostly, how did you guys get from where I am today, to where you are today?
Thanks for even reading this.
(I know java, android dev, and Js/node.js)
(Sry about the English ;D)7 -
Today I got screwed over by a CDN which is the first time I have seen it. I was getting a code 520 on the browser's console.
Package link -> https://npmjs.com/package/tippy.js/
After I downloaded its contents and put it directly in a js file, my website speed doubled in performance.
Its making me question using CDNs from this point onwards.1 -
Web dev (JS, node) question since there are so many here... I think...
I want to return a JSON array as a stream so the server passes whatever the DB returns but also normalize each record.
Also the data is across several collections. Is it possible to return this in a single request?
And how do I add in error handling? If there's an error in between the user already has part of the data?3 -
firstly, does anyone know of an online telegram or whatsapp group where i can ask silly stuff regarding web dev and get immediate answers, just like it is here?
secondly i am trying to learn js and there are just too many related terms that are messing with my brain:
"some features are supported ines5/es6/es15/es16/es17 , some are supported in chrome's v8/chakra/spidermonkey/android browser , some features are only supported in "serverside" and blocked in all browsers thanks to browser's vm environment; babel can't read this code, some features are provided only by node js..."
WHAT THE MESS IS THIS?
All i am trying to do is to write code that would make a website visible to everyone. if by specific browser , i want to target, chrome and its subsidaries and android chrome/other android browsers .
for other browsers am willing to make external converters later but don't want to change my code by 1 bit. And from what i know, each browser (at least the browsers am thinking of supporting) has the complete JS compilers already built in
can i or can i not built a complete functional website with those things?
and finally my main question : how to make custom exceptions in vanilla js? i saw this answer on stack overflow:
===================
function InvalidArgumentException(message) {
this.message = message;
// Use V8's native method if available, otherwise fallback
if ("captureStackTrace" in Error)
Error.captureStackTrace(this, InvalidArgumentException);
else
this.stack = (new Error()).stack;
}
InvalidArgumentException.prototype = Object.create(Error.prototype);
InvalidArgumentException.prototype.name = "InvalidArgumentException";
InvalidArgumentException.prototype.constructor = InvalidArgumentException;
Usage:
throw new InvalidArgumentException();
var err = new InvalidArgumentException("Not yet...");
=====================================
where is the error code? what would be the exception details? what is the line number/timestamp of error?why is that function making an error, i thought error/exception is a class in JS?4 -
Question time, i currently have a project in beginning stages. I has a node-js back-end build with express and sequelize. My current frontend is build in twig. And is within the back-end project structure. Now i have heard that the current hype is to take those separate. What is the best approach, and what frontend should i use? (I was thinking vue as interesting thing)
-
Ok, so I have a lot of work to finish and wanted some random people talking on youtube as background noise. When I tried to visit youtube, I accidentally misspelled it to youutbe.com and visited a site that stays empty but seems to be loading a lot of js. It is pretty intriguing. My question is, what could be the possible use case for such a site and what is the maximum harm that could be done by creating websites on misspelled domain names of frequently accessed other domains? Thoughts?3
-
So I was playing around with JS inside of QML (Qt). I wanted to turn a number into a string and then modify individual chars based on certain criteria. Then I would convert back to a number. Should be simple right? Well JS would not let me write to the indexed element of the string. What the actual fuck? I need to drop to C++ to do actual string manipulation? I ended up looping the string and turning it into an array and then a join back to a string. There is probably a better way to do this in a more modern version of JS, but I am now starting to see why JS is a pariah on here. It has some quirks that make you question your devlife choices.
What was I working on? Some stupid crop circle thingy. I was trying to use the QML Canvas to draw some "simple" crop circles. So I started with this crop circle:
https://plus.maths.org/content/...
The result ended up being kind of a swirling crop circle thing. The static image was too boring:
https://imgur.com/gallery/900hogf
And yes, I was too lazy/cheap to license the screen capture program.7 -
So i have been coding in python and its my main language. Give me 2 reason why i should learn js(node).this question aroused coz i have to work with MS Bot framework and they just support c# & node js (python is still in prev) and their code has asynchronous programming in both *cries in corner also suggest me good resources to lesrn what async prog2
-
i have this js object containing an array with about 7000 values. firefox, chrome and even ie11 need about 1.5 to 2 seconds to process it.
but edge takes 10 times longer! does anybody know about this behaviour? i could not find anything.
so, serious question. i just find results for ie being slow but THIS time it does its work properly. console shows no errors. is there information about edge-specific issues with javascript?9 -
Trying to make a nodejs backend is pure hell. It doesn't contain much builtin functionality in the first place and so you are forced to get a sea of smaller packages to make something that should be already baked in to happen. Momentjs and dayjs has thought nodejs devs nothing about the fact node runtime must not be as restrained as a browser js runtime. Now we are getting temporal api in browser js runtime and hopefully we can finally handle timezone hell without going insane. But this highlights the issue with node. Why wait for it to be included in js standard to finally be a thing. develop it beforehand. why are you beholden to Ecma standard. They write standards for web browser not node backend for god sake.
Also, authentication shouldn't be that complicated. I shouldn't be forced to create my own auth. In laravel scaffolding is already there and is asking you to get it going. In nodejs you have to get jwt working. I understand that you can get such scaffolding online with git clone but why? why express doesn't provide buildtin functions for authentication? Why for gods sake, you "npm install bcrypt"? I have to hash my own password before hand. I mean, realistically speaking nodejs is builtin with cryptography libraries. Hashmap literally uses hashing. Why can't it be builtin. I supposed any API needed auth. Instead I have to sign and verfiy my token and create middlewares for the job of making sure routes are protected.
I like the concept of bidirectional communication of node and the ugly thing, it's not impressive. any goddamn programming language used for web dev should realistically sustain two-way communication. It just a question of scaling, but if you have a backend that leverages usockets you can never go wrong. Because it's written in c. Just keep server running and sending data packets and responding to them, and don't finalize request and clean up after you serve it just keep waiting for new event.
Anyway, I hope out of this confused mess we call nodejs backend comes clean solutions just like Laravel came to clean the mess that was PHP backend back then.
Express is overrated by the way, and mongodb feels like a really ludicrous idea. we now need graphql in goddamn backend because of mongodb and it's cousins of nosql databases.7 -
Question!
Which better for free IDE web development (CSS, HTML, JS)
On my Synology?
Or use web host?
I tried in AWS too complicated for me!7 -
I want to make a project
student analysis system
It works as
Student will signin in the site and upload their academic detail including roll no. marks of all the semesters, and other academic details then It will give them analysis of their academic performance like what is his rank in his class, in the department, and in the whole College. It will also show that in which subject he was week, in which subjects in upcoming semester he have to work to secure good percentage and a graph of his performance till now and change in graph if he follow according to us. It will also show the placement probability.
Now my question is which tech stacks should I use to make all this?
I know HTML CSS JS JAVA CPP and a bit of REACT. Js EXPRESS. JS MYSQL.
I am ready to work with other tech stack also.8 -
visit the corporate elearning portal to do the mandatory trainings.. open browser, go to the page, login. start the training, then a quiz question pops up...
my IT sense tingling... open browser's developer tools, starts checking the HTML and JS source... then suddenly found something like this:
isCorrect = selected.join() === anwsers.join()
placed break point, put in random anwser, checked watch... (heartbeat increasing)
see the value is FALSE. Changed to TRUE manually, resume code...
Thank you, your anwser is correct!
WTF? I don't consider myself as a developer, but it's still hurts...1 -
Question:
Is there a good tool I can use to design my UI with vuejs support
I am looking at bootstrap studio but since I will be using multiple JS script as well as .vue file, it doesn’t seem to be good. -
I asked the Node gitter community but didn't get any response, and I fear for my life when I am posting on SO.
So, I would be posting my query here. Any help would be appreciated.
Query:
Hey! So I have a code like
var cached = true;
if(cached){
}else{}
When the v8 will profile and mark this function as hot, will the full compiler optimize it so that the 'if(cached)' is not checked every time?2 -
If you guys take syntax changing frameworks as still coding on the language the framework based on, I'm a c++ dev from now on.
P.S: read the tags3 -
A lot of our web forms are done with AngularJS and combined with jQuery it does everything I need to satify the needs of people who are most impressed CSS transitions and have no technical knowledge whatsoever. I have no peers to ask this question.
I'm the only person deciding on what JS libs to use at the company... and since AngularJS goes into maintenance mode... what would you guys suggest to handle form input and add/remove CSS classes to HTML elements?
Should I get on the VUE bandwagon this year?13 -
Have any early adopters tried out the new Deno yet? If you have, what are your thoughts?
https://github.com/denoland/deno2 -
WTF?
W_T_F?
W-T-F?
W$T$F?
how the fuck do you brand codebases?
say you've got a brand called dicks,
and you've got a website, api server, some SDK's, and whatever else. How do you format the codebase names so it's A, usable as a variable name, B clickable at the variable part of the name, C, that's fucking it
dicks-website can't be used in js because
dicks-website = require('dicks-website') won't work
dicks_website can't be used in url's and in general because double clicking any part will select the whole word, so you can't replace dicks_X easily.
dicks$api seems to work, dicks and api are seperately clickable, and usable as a variable in javascript. I already know that the $ sign probably fucks up many many systems so that's probably a no go
has this question been addressed already?4 -
I know I sound stupid but I need help, I create a repo on GitHub using gh-api ```js
export async function createARepo({name,description,token}) {
const headers = {
"Authorization": `token ${token}`,
"Accept": "application/vnd.github.v3+json",
}
const {data} = await axios(
{
method: "POST",
url: "https://api.github.com/user/repos",
data: {name,description,auto_init: true},
headers
}
)
return data
// console.log(res)
}```
when I run this code it only creates an empty project with a readme but I also want to create a file with a .html extension of the project can anybody help me with how I do this?7 -
Question:
I want to develop a simple reminders service. People will go online and set a reminder and the service will send an email when the reminder is schedule.
I want to use the simplest stack I can. It will be very simple so I don't want anything complex.
So I need a DB backend, a server to host the web interface so people can set up the reminders, and a background process that send out the emails.
People set up reminders, they are stored in the DB and the process read the reminders every X amount of time and send the emails scheduled in that particular time.
I was thinking about using Firebase (only tried it once in a small chat app for practice). A small web interface stored in a server (which? idk. Heroku, AWS?). And a deamon scheduled to run every half an hour (running where? idk. I have a spare laptop that I can use as server for this purpose or Heroku or any other).
What services (free, or at least free at the beginning) would you use in order to save time and money.
PS: I know Python and Java. But I've worked with PHP (and HTML+CSS). I know next to nothing about JS.11 -
been wanting to make a landing page where students in universities sign up, and they can see a leaderboard score of sign-ups per universities on the page as well. What is the best way to do this? Appreciate any feedback on this question, I am a new dev!2
-
Hello guys, I've posted a question here: https://softwareengineering.stackexchange.com/...
It's a question regarding taking ownership of a project with a apache 2 license. I've pretty much created the back-end part of this back end as a service. Some other colleagues created the Java, ios and js clients, so it's not entirely made by me.
More details in the question itself. -
I need an idea for a JS coding challenge for a job interview that a poor unlucky person is going to take after me, 'cause i'm leaving..
Requirements: it must be simple, but not simple enough for my other two colleagues. Aka no webpack, no framework, plain js inside a webpage.
My other two colleagues don't even know how to do an array.forEach() or literally how to code in general. They are copy-pastah programmers.
How can i do that without offending anyone?3 -
Hello devrant,
What are you guys thinking about applying -example- React.js job , you are already full stack and never wrote react before but you know good javascript .
What CEOs,CTOs , Team Leaders and developers think about those kind a job applications