• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 22:45
CET 04:45
KST 12:45
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)15Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1833
StarCraft 2
General
SC2 All-Star Invitational: Jan 17-18 Stellar Fest "01" Jersey Charity Auction Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets When will we find out if there are more tournament SC2 Spotted on the EWC 2026 list?
Tourneys
OSC Season 13 World Championship SC2 AI Tournament 2026 Sparkling Tuna Cup - Weekly Open Tournament $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) $25,000 Streamerzone StarCraft Pro Series announced
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes
Brood War
General
[ASL21] Potential Map Candidates BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone Potential ASL qualifier breakthroughs?
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Awesome Games Done Quick 2026! Beyond All Reason Nintendo Switch Thread Mechabellum Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread Trading/Investing Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
My 2025 Magic: The Gathering…
DARKING
Physical Exercise (HIIT) Bef…
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2182 users

The Big Programming Thread - Page 706

Forum Index > General Forum
Post a Reply
Prev 1 704 705 706 707 708 1032 Next
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.
Thaniri
Profile Blog Joined March 2011
1264 Posts
Last Edited: 2016-02-24 16:49:25
February 24 2016 16:48 GMT
#14101
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.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2016-02-24 17:03:38
February 24 2016 17:01 GMT
#14102
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 have a good reason to disagree with the above, please tell me. Thank you.
Ropid
Profile Joined March 2009
Germany3557 Posts
February 24 2016 17:06 GMT
#14103
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.
"My goal is to replace my soul with coffee and become immortal."
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
February 24 2016 17:14 GMT
#14104
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.
you gotta dance
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
Last Edited: 2016-02-24 19:18:39
February 24 2016 18:11 GMT
#14105
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.
Time is precious. Waste it wisely.
Wrath
Profile Blog Joined July 2014
3174 Posts
February 29 2016 18:43 GMT
#14106
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...).
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
February 29 2016 23:42 GMT
#14107
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.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
March 01 2016 01:55 GMT
#14108
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
Last Edited: 2016-03-01 02:50:02
March 01 2016 02:47 GMT
#14109
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
Time is precious. Waste it wisely.
killa_robot
Profile Joined May 2010
Canada1884 Posts
March 01 2016 02:59 GMT
#14110
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.
tofucake
Profile Blog Joined October 2009
Hyrule19188 Posts
March 01 2016 03:05 GMT
#14111
I've actually found that there's more jobs than developers...
Liquipediaasante sana squash banana
-Zoda-
Profile Blog Joined April 2011
France3578 Posts
March 01 2016 06:14 GMT
#14112
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).
♪ 最初はi つなぐdo それ つまりlife 常に移動 ♪ - IGN: Uhryks
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
March 01 2016 11:41 GMT
#14113
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.
Time is precious. Waste it wisely.
Wrath
Profile Blog Joined July 2014
3174 Posts
March 01 2016 13:34 GMT
#14114
^ 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.
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
March 01 2016 13:42 GMT
#14115
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
Time is precious. Waste it wisely.
Wrath
Profile Blog Joined July 2014
3174 Posts
March 01 2016 14:08 GMT
#14116
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...
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
March 01 2016 14:29 GMT
#14117
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.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19188 Posts
March 01 2016 14:35 GMT
#14118
yeah but like 70% of the time it'll be php
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17605 Posts
March 01 2016 14:54 GMT
#14119
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.
Time is precious. Waste it wisely.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
March 02 2016 01:59 GMT
#14120
What's the module pattern?
There is no one like you in the universe.
Prev 1 704 705 706 707 708 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 8h 15m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft377
RuFF_SC2 107
Ketroc 71
StarCraft: Brood War
Noble 256
Shuttle 85
Shine 78
HiyA 37
ZergMaN 34
Hm[arnc] 14
Icarus 5
Dota 2
monkeys_forever228
NeuroSwarm87
League of Legends
C9.Mang0553
JimRising 548
Cuddl3bear8
Counter-Strike
Coldzera 1349
Other Games
summit1g7841
XaKoH 343
hungrybox288
KnowMe111
ViBE67
minikerr30
Liquid`Ken2
Organizations
Other Games
gamesdonequick2867
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Hupsaiya 113
• practicex 12
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 80
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Doublelift5413
Other Games
• Scarra1452
Upcoming Events
OSC
8h 15m
SKillous vs ArT
ArT vs Babymarine
NightMare vs TriGGeR
YoungYakov vs TBD
All Star Teams
22h 30m
INnoVation vs soO
Serral vs herO
Cure vs Solar
sOs vs Scarlett
Classic vs Clem
Reynor vs Maru
uThermal 2v2 Circuit
1d 8h
AI Arena Tournament
1d 16h
All Star Teams
1d 22h
MMA vs DongRaeGu
Rogue vs Oliveira
Sparkling Tuna Cup
2 days
OSC
2 days
Replay Cast
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
[ Show More ]
The PondCast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-01-14
Big Gabe Cup #3
NA Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
Escore Tournament S1: W4
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025

Upcoming

Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
SC2 All-Star Inv. 2025
Nations Cup 2026
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.