|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
If that is actually the example code, then if it had supporting documentation it'd be understandable.
+ Show Spoiler + function convert(num) { var holder = ""; while (num > 0){ if(num >= 1000){ num = num - 1000; holder = holder + "M"; } else if(num >= 900){ num = num - 900; holder = holder + "CM"; } else if(num >= 500){ num = num - 500; holder = holder + "D"; } else if(num >= 400){ num = num - 400; holder = holder + "CD"; } else if(num >= 100){ num = num - 100; holder = holder + "C"; } else if(num >= 90){ num = num - 90; holder = holder + "XC"; } else if(num >= 50){ num = num - 50; holder = holder + "L"; } else if(num >= 40){ num = num - 40; holder = holder + "XL"; } else if(num >= 10){ num = num - 10; holder = holder + "X"; } else if(num >= 9){ num = num - 9; holder = holder + "IX"; } else if(num >= 5){ num = num -5; holder = holder + "V"; } else if(num >= 4){ num = num - 4; holder = holder + "IV"; } else if (num >= 1){ num = num -1; holder = holder + "I"; } } return holder; }
convert(36);
I'm a pretty shit programmer, and here is a script to convert from decimal to roman numerals. Does this code evoke similar emotions when you look at it?
Was thinking of building a calculator that had binary, decimal, hexadecimal, and roman numeral for my own learning.
|
On February 25 2016 01:48 Thaniri wrote:If that is actually the example code, then if it had supporting documentation it'd be understandable. + Show Spoiler + function convert(num) { var holder = ""; while (num > 0){ if(num >= 1000){ num = num - 1000; holder = holder + "M"; } else if(num >= 900){ num = num - 900; holder = holder + "CM"; } else if(num >= 500){ num = num - 500; holder = holder + "D"; } else if(num >= 400){ num = num - 400; holder = holder + "CD"; } else if(num >= 100){ num = num - 100; holder = holder + "C"; } else if(num >= 90){ num = num - 90; holder = holder + "XC"; } else if(num >= 50){ num = num - 50; holder = holder + "L"; } else if(num >= 40){ num = num - 40; holder = holder + "XL"; } else if(num >= 10){ num = num - 10; holder = holder + "X"; } else if(num >= 9){ num = num - 9; holder = holder + "IX"; } else if(num >= 5){ num = num -5; holder = holder + "V"; } else if(num >= 4){ num = num - 4; holder = holder + "IV"; } else if (num >= 1){ num = num -1; holder = holder + "I"; } } return holder; }
convert(36);
I'm a pretty shit programmer, and here is a script to convert from decimal to roman numerals. Does this code evoke similar emotions when you look at it? Was thinking of building a calculator that had binary, decimal, hexadecimal, and roman numeral for my own learning. You certainly can code that a lot better by introducing a map of roman numerals to decimal values (I = 1, IV = 4, V = 5...) and then looking up the best fit each time. You basically reduce your loop to a single of these if blocks.
It would also be flexible enough to support the unary system (map is just I = 1) and a variety of completely stupid other systems you could invent on the spot.
|
On February 25 2016 01:48 Thaniri wrote:If that is actually the example code, then if it had supporting documentation it'd be understandable. + Show Spoiler + function convert(num) { var holder = ""; while (num > 0){ if(num >= 1000){ num = num - 1000; holder = holder + "M"; } else if(num >= 900){ num = num - 900; holder = holder + "CM"; } else if(num >= 500){ num = num - 500; holder = holder + "D"; } else if(num >= 400){ num = num - 400; holder = holder + "CD"; } else if(num >= 100){ num = num - 100; holder = holder + "C"; } else if(num >= 90){ num = num - 90; holder = holder + "XC"; } else if(num >= 50){ num = num - 50; holder = holder + "L"; } else if(num >= 40){ num = num - 40; holder = holder + "XL"; } else if(num >= 10){ num = num - 10; holder = holder + "X"; } else if(num >= 9){ num = num - 9; holder = holder + "IX"; } else if(num >= 5){ num = num -5; holder = holder + "V"; } else if(num >= 4){ num = num - 4; holder = holder + "IV"; } else if (num >= 1){ num = num -1; holder = holder + "I"; } } return holder; }
convert(36);
I'm a pretty shit programmer, and here is a script to convert from decimal to roman numerals. Does this code evoke similar emotions when you look at it? Was thinking of building a calculator that had binary, decimal, hexadecimal, and roman numeral for my own learning. When you notice you are doing something like that, where you copy'n'paste in your editor and edit slightly each time you paste, the different programming languages usually have some feature you could use. You could do this repetition through your code instead of in your editor. The benefit would be that you can change everything at once if you find a mistake or want add something.
|
On February 25 2016 02:01 spinesheath wrote:Show nested quote +On February 25 2016 01:48 Thaniri wrote:If that is actually the example code, then if it had supporting documentation it'd be understandable. + Show Spoiler + function convert(num) { var holder = ""; while (num > 0){ if(num >= 1000){ num = num - 1000; holder = holder + "M"; } else if(num >= 900){ num = num - 900; holder = holder + "CM"; } else if(num >= 500){ num = num - 500; holder = holder + "D"; } else if(num >= 400){ num = num - 400; holder = holder + "CD"; } else if(num >= 100){ num = num - 100; holder = holder + "C"; } else if(num >= 90){ num = num - 90; holder = holder + "XC"; } else if(num >= 50){ num = num - 50; holder = holder + "L"; } else if(num >= 40){ num = num - 40; holder = holder + "XL"; } else if(num >= 10){ num = num - 10; holder = holder + "X"; } else if(num >= 9){ num = num - 9; holder = holder + "IX"; } else if(num >= 5){ num = num -5; holder = holder + "V"; } else if(num >= 4){ num = num - 4; holder = holder + "IV"; } else if (num >= 1){ num = num -1; holder = holder + "I"; } } return holder; }
convert(36);
I'm a pretty shit programmer, and here is a script to convert from decimal to roman numerals. Does this code evoke similar emotions when you look at it? Was thinking of building a calculator that had binary, decimal, hexadecimal, and roman numeral for my own learning. You certainly can code that a lot better by introducing a map of roman numerals to decimal values (I = 1, IV = 4, V = 5...) and then looking up the best fit each time. You basically reduce your loop to a single of these if blocks. It would also be flexible enough to support the unary system (map is just I = 1) and a variety of completely stupid other systems you could invent on the spot. If you use an ordered map, of decimal to numeral, you can just iterate in reverse through the keys, as well. Then the only check is to make sure you don't drop below 0 when subtracting.
|
On February 25 2016 01:48 Thaniri wrote:If that is actually the example code, then if it had supporting documentation it'd be understandable. + Show Spoiler + function convert(num) { var holder = ""; while (num > 0){ if(num >= 1000){ num = num - 1000; holder = holder + "M"; } else if(num >= 900){ num = num - 900; holder = holder + "CM"; } else if(num >= 500){ num = num - 500; holder = holder + "D"; } else if(num >= 400){ num = num - 400; holder = holder + "CD"; } else if(num >= 100){ num = num - 100; holder = holder + "C"; } else if(num >= 90){ num = num - 90; holder = holder + "XC"; } else if(num >= 50){ num = num - 50; holder = holder + "L"; } else if(num >= 40){ num = num - 40; holder = holder + "XL"; } else if(num >= 10){ num = num - 10; holder = holder + "X"; } else if(num >= 9){ num = num - 9; holder = holder + "IX"; } else if(num >= 5){ num = num -5; holder = holder + "V"; } else if(num >= 4){ num = num - 4; holder = holder + "IV"; } else if (num >= 1){ num = num -1; holder = holder + "I"; } } return holder; }
convert(36);
I'm a pretty shit programmer, and here is a script to convert from decimal to roman numerals. Does this code evoke similar emotions when you look at it? Was thinking of building a calculator that had binary, decimal, hexadecimal, and roman numeral for my own learning.
This is basically a single if/else block inside a while loop. Nothing scary about that. It's when your nesting goes deeper than that when you begin to distinguish the faint code smell.
Edit: Also, note the fact that what I posted was simply the blocks in the code. What you should imagine is that each of those functions (maybe except the firs one) is spanning at least 500 lines and doing some stuff on arrays... Oh, and anyone who wrote it obviously never heard of comments. Nightmare.
|
TeamLiquid front end developers. I call upon you!
I'm applying for a frond end developer position and I have 0 experience. Please tell me what I should expect in the interview (If I was lucky enough to reach there...).
|
I'm very inexperienced with it too, but they'll probably get you to write some basic js functions, use JSON in there to interface with something else, have familiarity with Bootstrap or some other framework and design a basic website template from scratch. Depends on what the position focuses on, really. If the job focuses in one area then obviously that'll be more important for the interview.
|
|
With JS you should familiarize yourself with the module pattern (it'll make understanding libraries like jQuery a lot easier).
With HTML you should learn when to use which tags and some of the more complex ones (video, iframes etc.). It's really important. Also, knowing how to apply aria labels might be a huge bonus (but I doubt most interviewers will ask about it).
For CSS you should really learn something more than pure CSS (no one I know writes in pure CSS any more). LESS or SASS is the way to go.
Basically, you should focus on 2 thigs first: jQuery + Bootstrap since those are most commonly used libraries and if you know them it'll be easier to learn others.
If you have 0 experience I suggest that for the first week you read up on stuff and start with some (not that easy stuff).
Task 1: Create a single HTML page, no JS, no Bootstrap, just pure HTML and CSS (can be LESS or SASS). But, you have to create some specific elements for it: a) header b) left section (1/3rd width) c) right section (2/3rds width) d) footer
Now, your job is to make sure that the footer is always on the bottom. It can never go above the bottom side of your screen (it can go below). Left and right sections must be of the same height, regardless of the amount of content you put in each of them (tip: give each element a different background color so you can see them better). Layout can't break if you resize your window (it can scale, but elements can't overlap or disappear suddenly).
This is much harder than you think.
Task 2: Do the same with Bootstrap (and see how easy it can be).
After that you should just practice adding more stuff to your page. Dropdown menus, modals, sliders, carousels etc.
With that, you'll at least have some decent basics under your belt.
Also, here's a very good thing for every front-end developer: https://www.google.com/design/spec/material-design/introduction.html
|
On March 01 2016 03:43 WrathSCII wrote: TeamLiquid front end developers. I call upon you!
I'm applying for a frond end developer position and I have 0 experience. Please tell me what I should expect in the interview (If I was lucky enough to reach there...).
Give up because the market is over saturated and they'll just hire someone with lots of experience or someone who has created their own projects over you.
If you're really interested, then work on some open-source projects to build up your resume.
|
Hyrule18969 Posts
I've actually found that there's more jobs than developers...
|
Dunno about the US but most of the time I hear there are many jobs but many applications. I'm sort of in the same case as you, so I can't give much advice. I'm following general IT courses atm so I'm leaning a bit more on the full-stack side (but that doesn't mean much with very little experience).
|
On March 01 2016 11:59 killa_robot wrote:Show nested quote +On March 01 2016 03:43 WrathSCII wrote: TeamLiquid front end developers. I call upon you!
I'm applying for a frond end developer position and I have 0 experience. Please tell me what I should expect in the interview (If I was lucky enough to reach there...). Give up because the market is over saturated and they'll just hire someone with lots of experience or someone who has created their own projects over you. If you're really interested, then work on some open-source projects to build up your resume.
That's like the worst advice ever. Sure, he might not get a job on his first interview (or even fourth) but I'm sure that if he'll take note of the questions asked, learn about it and try again he'll eventually get there. I know I did. A little over 2 years ago I was in the same spot as he is in now (no previous experience, looking for a front-end dev job) and now I'm a senior back-end developer with people spamming me with 3 job offers each day.
It's all a matter of determination and willingness to learn.
|
^ Thanks for the awesome words, you sure encouraged me to continue on my eternal task of getting away from the administration shit.
I'm more interested on how you ended up being a senior back-end developer when you were looking for a front-end dev job.
|
On March 01 2016 22:34 WrathSCII wrote: ^ Thanks for the awesome words, you sure encouraged me to continue on my eternal task of getting away from the administration shit.
I'm more interested on how you ended up being a senior back-end developer when you were looking for a front-end dev job.
I slowly shifted my focus after discovering that front-end is not the place where I want to be... You'll do a couple of "pixel perfect" projects and you'll be puking with it too
|
On March 01 2016 22:42 Manit0u wrote:Show nested quote +On March 01 2016 22:34 WrathSCII wrote: ^ Thanks for the awesome words, you sure encouraged me to continue on my eternal task of getting away from the administration shit.
I'm more interested on how you ended up being a senior back-end developer when you were looking for a front-end dev job. I slowly shifted my focus after discovering that front-end is not the place where I want to be... You'll do a couple of "pixel perfect" projects and you'll be puking with it too 
Well, the reason I'm going for front-end development is because it is the most available job for now. If it was up to me that I could do whatever I wanted to do, I would have chosen something emulating and the low low level like assembly and stuff.
The most language I love is C and C++. But it is just impossible to get jobs with fields like that where I live...
|
Well, the good thing about front-end development is that it doesn't really marry you to a specific back-end language, which translates into more opportunities to find a job.
|
Hyrule18969 Posts
yeah but like 70% of the time it'll be php
|
On March 01 2016 23:35 tofucake wrote: yeah but like 70% of the time it'll be php
Can't help the fact that over 80% of websites run on PHP. But there's also plenty of work in SaaS and ERP departments - it's mostly back-end though.
|
What's the module pattern?
|
|
|
|