• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:00
CEST 14:00
KST 21:00
  • 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
BGE Stara Zagora 2025: Info & Preview3Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL42Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
GSL Ro4 and Finals moved to Sunday June 15th5Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results21Code S RO12 Results + RO8 Groups (2025 Season 2)3Weekly Cups (May 19-25): Hindsight is 20/20?0
StarCraft 2
General
BGE Stara Zagora 2025: Info & Preview EWC 2025 Regional Qualifier Results GSL Ro4 and Finals moved to Sunday June 15th The SCII GOAT: A statistical Evaluation The Memories We Share - Facing the Final(?) GSL
Tourneys
$1,200 WardiTV June (June 4th-June 15th) SOOPer7s Showmatches 2025 Weekly Cups (May 27-June 1): ByuN goes back-to-back EWC 2025 Regional Qualifiers (May 28-June 1) WardiTV Mondays
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void
Brood War
General
BGH auto balance -> http://bghmmr.eu/ BW General Discussion Will foreigners ever be able to challenge Koreans? Battle.net is not working Which player typ excels at which race or match up?
Tourneys
[ASL19] Grand Finals [BSL20] RO20 Group Stage [BSL20] RO20 Group D - Sunday 20:00 CET [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Mechabellum Monster Hunter Wilds Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread TL Mafia Plays: Diplomacy TL Mafia: Generative Agents Showdown Survivor II: The Amazon
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
NHL Playoffs 2024 Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List
Blogs
Heero Yuy & the Tax…
KrillinFromwales
Research study on team perfo…
TrAiDoS
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Info SLEgma_12
SLEgma_12
Customize Sidebar...

Website Feedback

Closed Threads



Active: 16672 users

Life as a Web Developer - Page 2

Blogs > tofucake
Post a Reply
Prev 1 2 3 Next All
AssuredVacancy
Profile Blog Joined September 2008
United States1167 Posts
July 06 2010 16:01 GMT
#21
That man is a genius at coding. He's securing his job for life.
We spend our youth attaining wealth, and our wealth attaining youth.
Deleted User 61629
Profile Blog Joined March 2010
1664 Posts
Last Edited: 2010-07-06 18:52:45
July 06 2010 18:41 GMT
#22
--- Nuked ---
tofucake
Profile Blog Joined October 2009
Hyrule19024 Posts
July 06 2010 18:53 GMT
#23
On July 07 2010 03:41 Inori wrote:
Show nested quote +
function createpasswordhash($user, $raw_pass)
{
// this should ONLY be used to create NEW passwords, as
// the salt is based on the time
$salt = sha1($user . array_sum(explode(' ', microtime())));
$raw = $salt . sha1(sha1($user) . sha1($salt . $raw_pass));

return $raw;
}

This is quite common with beginner coders really. Everyone has this period where they feel they need to reinvent everything and are smarter than everyone. I remember wondering why I'm the only one "smart" enough to use sha1(md5(base64_encode()));
Except I'm a professional PHP developer ^^
That's code I wrote when I was a beginner, I admit, but it's easy and copypasta is my friend. It's perfectly secure and quicker than using mcrypt. And the SHA'ing of multiple things is just for diversity. A 40 character salt is better than a 20 character salt, after all.
Liquipediaasante sana squash banana
Deleted User 61629
Profile Blog Joined March 2010
1664 Posts
Last Edited: 2010-07-06 19:03:10
July 06 2010 18:57 GMT
#24
--- Nuked ---
tofucake
Profile Blog Joined October 2009
Hyrule19024 Posts
July 06 2010 19:16 GMT
#25
That's only true when the SHA hash is shorter than the source, so unless someone has a 28 character password (and I usually cap length at about 20 anyway), there's no impact on the security.
Liquipediaasante sana squash banana
nath
Profile Blog Joined May 2010
United States1788 Posts
July 06 2010 19:22 GMT
#26
meh...this isn't really bad. just overkill...

but yeah i guess it wastes processing power, not that much though (don't lie to yourself, setting the variable again takes nothing)

comments aren't bad; where i work we have this 'genius' who is amazing at coding but his shit is impossible to decipher. we're lucky because he will just redo it form scratch instead of making it easy to modify so we could just modify it -.-

(I have extensive knowledge of PHP/SQL)
Founder of Flow Enterprises, LLC http://flow-enterprises.com/
tofucake
Profile Blog Joined October 2009
Hyrule19024 Posts
Last Edited: 2010-07-06 19:27:22
July 06 2010 19:27 GMT
#27
This one page I'm working on now was originally 800 lines with 12 SQL queries. I have reduced it to 350 lines and 2 SQL queries, and still managed to add functionality. That's BAD.
Liquipediaasante sana squash banana
michiko
Profile Joined April 2010
United States75 Posts
Last Edited: 2010-07-06 21:31:00
July 06 2010 21:28 GMT
#28
So how long have you been PHP programming?

My only qualm with PHP is despite it being really easy/fun/extensive to learn and code in...I've heard that PHP coding is pretty entry level as far as a career goes.

A coding friend of mine started OFF in PHP and moved into other languages.

That said...I'm like ultra excited about an upcoming potential opportunity to start coding full-time, from part-time.

Also - and maybe this will help spark more of a debate, especially regarding life as a web developer - how much are we/you being replaced by the really smart coders?

As in - There are a dozen CMS and Web Cart framework applications that business people can purchase...

Why pay someone a pretty decent salary when you can just BUY the framework/CMS/Cart and install it yourself?

==

Just as our individual 'EXP' bars go up as we code, and become veterans from beginners....I feel that the whole industry of programming has that same EXP bar...and it is constantly weeding out the un-needed...Like poor Bob that wrote the silly code in the OP.

==

And Oh Yeah! PDO. I remember that stuff. I don't see why I would incorporate PDO functions into a Project that is going to stay strictly with MySQL. Am I missing something? Does it reduce lines of code that much? I'm by far the infant of the group - so i'll take knowledge spankings -

tofucake
Profile Blog Joined October 2009
Hyrule19024 Posts
Last Edited: 2010-07-06 21:41:40
July 06 2010 21:40 GMT
#29
I've been programming in PHP for about 8 years now? Something like that. The best analogy I can think of for PHP is one not many people understand (but all of you will!): It's like StarCraft - easy to get started in and damn hard to master.

And, once again, I'm not using PDO, just OOP.

As for being replaced....I'm one of the really smart coders doing the replacing. I know another 5 programming languages, I know how a CPU works (and can/have built a functioning computer, and I don't mean from parts off Newegg), and I have tons of experience. What I lack, being mostly self taught, is formatted knowledge about things. For instance, I used MVC style coding for 4 years before I knew what MVC style was. I also lack in some areas, but my primary job is getting me experience in those areas. And not to too my own horn, I know I still have a very long way to go before I'd ever even be able to consider maybe thinking about possibly calling myself an expert.

And yes! Networking is important. I've got friends in all kinds of tech jobs (mostly programming), from Northrup Grumman to the Canadian Government. References from those guys go a lot farther than a reference from your boss over at Best Buy.
Liquipediaasante sana squash banana
Deleted User 61629
Profile Blog Joined March 2010
1664 Posts
Last Edited: 2010-07-07 04:35:11
July 07 2010 04:32 GMT
#30
--- Nuked ---
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2010-07-07 04:43:47
July 07 2010 04:36 GMT
#31
Dude that's nothing this is what I had to work with when I had to fix up someone's website that was never finished.


//checks what certificate they purchased
function ninjapants($g, $c) {
$co2 = ($c > 0) ? true : false;
$green = ($g > 0) ? true : false;

if($co2 && $green) return 1;
elseif($co2) return 3;
elseif($green) return 2;
else return false;
}

//generates the PDF file
function ninjagloves($type, $one, $two, $three, $four, $total, $five = ''){
$ski = array();
$ski[0] = 'This document confirms that';

$one = stripslashes($one);
$two = stripslashes($two);
$three = stripslashes($three);
$four = stripslashes($four);
$five = stripslashes($five);
$total = stripslashes($total);

$lah = $this->ninjapants($three, $four);

switch($type) {
case 'business':

... you get the idea


These guys still got paid around $10,000 for building a piece of crap that never worked.

Also I can't wait till PHP is replaced with Ruby (not RoR). PHP is the worst language ever (yeah I could write a whole book about it) and there will be less un-qualified script kiddies making websites.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
Hokum
Profile Joined February 2009
Norway9 Posts
July 07 2010 08:08 GMT
#32
Even though the code you snipped is harmless, it is still copyrighted company code, and not something you should be posting on a public forum.

The internet is fun when it is anonymous and it is easy to take these things lightly, but if I was your manager, I would show you the door... something to think about at least.
1 day pass could be like 3 days of ramen
haduken
Profile Blog Joined April 2003
Australia8267 Posts
July 07 2010 08:12 GMT
#33
LOL, ninjapants.
Rillanon.au
evanthebouncy!
Profile Blog Joined June 2006
United States12796 Posts
July 07 2010 10:19 GMT
#34
ninjagloves!

I couldn't stop laughing for 1 minute
Life is run, it is dance, it is fast, passionate and BAM!, you dance and sing and booze while you can for now is the time and time is mine. Smile and laugh when still can for now is the time and soon you die!
evanthebouncy!
Profile Blog Joined June 2006
United States12796 Posts
July 07 2010 10:20 GMT
#35
hahahha shit still laughing about ninjapants and ninjagloves
Life is run, it is dance, it is fast, passionate and BAM!, you dance and sing and booze while you can for now is the time and time is mine. Smile and laugh when still can for now is the time and soon you die!
Adeny
Profile Blog Joined January 2009
Norway1233 Posts
July 07 2010 10:55 GMT
#36
I'm going to name all of my functions and variables arbitrary words, too! BTW, why is there no coding thread here? We've got threads for most other hobbies, and there seems to be quite a couple of coders here. Anyone feel like starting one?
wanderer
Profile Blog Joined May 2007
United States641 Posts
Last Edited: 2010-07-07 11:11:40
July 07 2010 11:10 GMT
#37
i don't understand... is this dumb because white space matters in PHP? so what if he wants to take the extra effort into making it look pretty. i would if i had the time and liked my job.

...or is it dumb because they didnt do it the fancy way
Fuck you, I have a degree in mathematics and I speak 12 languages. (I called the World Cup final in 2008 btw)
Adeny
Profile Blog Joined January 2009
Norway1233 Posts
Last Edited: 2010-07-07 11:33:50
July 07 2010 11:25 GMT
#38
On July 07 2010 20:10 wanderer wrote:
i don't understand... is this dumb because white space matters in PHP? so what if he wants to take the extra effort into making it look pretty. i would if i had the time and liked my job.

...or is it dumb because they didnt do it the fancy way


He basically does this:
(pseudo, ofcourse)

a = b
b = a

Except for with all the variables, so the second set is completely unneccesary and does aboslutely nothing, it's equal to doing

a = a

which it obviously is already.
tofucake
Profile Blog Joined October 2009
Hyrule19024 Posts
July 07 2010 11:52 GMT
#39
On July 07 2010 20:10 wanderer wrote:
i don't understand... is this dumb because white space matters in PHP? so what if he wants to take the extra effort into making it look pretty. i would if i had the time and liked my job.

...or is it dumb because they didnt do it the fancy way

Like the guy said, he did a = b, b = a. The problem with the whitespace is that he aligns EVERYTHING in the file, not just blocks. There's parts where there's 23 (yes, 23) tabs before the start of a line of code. That's already a line wrap on a 1660x900 monitor.
Liquipediaasante sana squash banana
Adeny
Profile Blog Joined January 2009
Norway1233 Posts
July 07 2010 12:02 GMT
#40
Probably been told, by some professor, some time, in the ancient past, that it HAS to be done that way. Poor soul.
Prev 1 2 3 Next All
Please log in or register to reply.
Live Events Refresh
Replay Cast
10:00
2025 GSL S2 - Ro12 Group B
CranKy Ducklings214
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko265
EnDerr 100
StarCraft: Brood War
Britney 65655
Calm 10679
Rain 8534
Bisu 3554
Horang2 2276
Hyuk 1030
Pusan 641
Mini 588
Larva 452
BeSt 425
[ Show more ]
EffOrt 313
Hyun 112
Dewaltoss 101
Light 89
ToSsGirL 73
Snow 71
Killer 69
sSak 57
Mong 47
JYJ31
[sc1f]eonzerg 25
Free 23
Icarus 22
Sharp 20
Barracks 18
ajuk12(nOOB) 18
Movie 14
JulyZerg 13
IntoTheRainbow 9
SilentControl 8
scan(afreeca) 8
zelot 7
HiyA 6
hero 6
Dota 2
420jenkins1241
XcaliburYe1122
Pyrionflax225
Counter-Strike
olofmeister3110
x6flipin680
Stewie2K338
allub233
markeloff108
Other Games
singsing2748
B2W.Neo685
DeMusliM398
XaKoH 151
ArmadaUGS54
Has28
QueenE13
Organizations
StarCraft 2
WardiTV261
StarCraft: Brood War
lovetv 7
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH278
• StrangeGG 69
• -Miszu- 4
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• WagamamaTV313
Upcoming Events
PiGosaur Monday
12h
Bellum Gens Elite
1d
The PondCast
1d 22h
Bellum Gens Elite
1d 23h
Replay Cast
2 days
Bellum Gens Elite
2 days
Replay Cast
3 days
CranKy Ducklings
3 days
SC Evo League
4 days
Bellum Gens Elite
4 days
[ Show More ]
Fire Grow Cup
4 days
CSO Contender
4 days
Replay Cast
4 days
SOOP
4 days
SHIN vs GuMiho
Sparkling Tuna Cup
4 days
AllThingsProtoss
4 days
Fire Grow Cup
5 days
Replay Cast
5 days
Replay Cast
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-05-28
DreamHack Dallas 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL Season 17: Qualifier 1
CSL Season 17: Qualifier 2
2025 GSL S2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

CSL 17: 2025 SUMMER
Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLAN 2025
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Bellum Gens Elite Stara Zagora 2025
Murky Cup #2
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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 © 2025 TLnet. All Rights Reserved.