• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:45
CEST 21:45
KST 04: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
[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244
Community News
StarCraft open world shooter announced at BlizzCon28Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?157Stellar Fest TWO the Moon (Dec 16-20)9Weekly Cups (August 24-30): Patches' balance mod takes over3
StarCraft 2
General
StarCraft open world shooter announced at BlizzCon Balance hotfix patch 5.0.16b (July 16) Team Liquid Map Contest #22: Results and Winners Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism SC4ALL: II Winner will earn a spot at HSC 30!
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 KSL Week #92 IntoTheTV X SOOP SC2 League : Weekly & Monthly 2026 GSTL Announcement Sparkling Tuna Cup - Weekly Open Tournament
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 542 The Ascended Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This
Brood War
General
Official StarCraft website teases new content ahead of BlizzCon? Broodwar Prediction Market BGH Auto Balance -> http://bghmmr.eu/ Practice Partners (Official) [D] Brainstorming a balance patch for Brood war
Tourneys
[ASL22] Ro16 Group A [ASL22] Ro16 Group B Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Replay Review Process - What do you do? Simple Questions, Simple Answers Odyssey Mineral Stack Saturation Game Theory for Starcraft
Other Games
General Games
Diablo IV Nintendo Switch Thread EVE Corporation [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread UK Politics Mega-thread Things Aren’t Peaceful in Palestine Trading/Investing Thread Russo-Ukrainian War Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Diablo Animated Series on Netflix Movie Discussion!
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Virtual Romance, Real-Life C…
TrAiDoS
Regacy Esports:Our Goa…
regacyesports
Dreaming of BW patches (mod…
c3rberUs
LOCKPICKING NOOB
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7278 users

The Big Programming Thread - Page 554

Forum Index > General Forum
Post a Reply
Prev 1 552 553 554 555 556 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.
Cynry
Profile Blog Joined August 2010
810 Posts
December 03 2014 15:06 GMT
#11061
On December 03 2014 23:43 Nesserev wrote:
Show nested quote +
On December 03 2014 19:26 Manit0u wrote:
http://www.gotw.ca/gotw/005.htm

C++ and why I'm happy I don't have to code in it

"Ignorance is a bliss" <3

Seriously, exception handling in C++ is not that bad... it's just that most people don't know what the fuck they're doing, or what they should be doing. C++ is evil and will f*ck you over if it can, and that's why you need to grow a pair of balls and study it all the way, know most of the stuff in-depth. It's not a language that you should use if you just know the basics.

Show nested quote +
On December 03 2014 11:43 Khalum wrote:
I'd also like to contribute my favourite stackoverflow topic: http://stackoverflow.com/questions/22780466/why-cant-my-program-compile-under-windows-7-in-french

This is comedy gold... I think I'm gonna tease my French friends with this

Especially the "return should be surrender" part. Loved that one ^^
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-12-04 15:07:35
December 04 2014 15:02 GMT
#11062
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.
Time is precious. Waste it wisely.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-12-04 20:58:41
December 04 2014 20:55 GMT
#11063
Has anyone had experience with drawing images in C# by utilising GPU? I have to use Win Forms and GDI+ doesn't seem too nice when it has to draw frequently on a bitmap. The problem is CPU usage is higher than acceptable, and I think GPU should do the heavy lifting here.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 04 2014 21:03 GMT
#11064
On December 05 2014 00:02 Manit0u wrote:
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.


how else do you store dates?
There is no one like you in the universe.
LaNague
Profile Blog Joined April 2010
Germany9118 Posts
December 04 2014 21:31 GMT
#11065
has anyone here used WIX toolset for creating a windows installer before?

i wanted to use their heat.exe to collect my files and filestructure automatically, but it gave me a 3Mb textfile with super-spam in it.
Now i did it by hand for now, but i would prefer an automatic process because that was an hour not well spend.
Shenghi
Profile Joined August 2010
167 Posts
December 05 2014 06:00 GMT
#11066
On December 05 2014 06:03 Blisse wrote:
Show nested quote +
On December 05 2014 00:02 Manit0u wrote:
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.


how else do you store dates?

In a DATETIME, DATETIME2 or LONG as (milli)seconds since epoch. When storing as DATETIME or LONG you might want to add a second column for storing timezone information, depending on specs.
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 05 2014 06:07 GMT
#11067
OH he was asking why you would store dates as timestamps sarcastically whoops XD
There is no one like you in the universe.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
December 05 2014 13:01 GMT
#11068
--- Nuked ---
Khalum
Profile Joined September 2010
Austria831 Posts
December 05 2014 15:03 GMT
#11069
On December 05 2014 15:00 Shenghi wrote:
Show nested quote +
On December 05 2014 06:03 Blisse wrote:
On December 05 2014 00:02 Manit0u wrote:
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.


how else do you store dates?

In a DATETIME, DATETIME2 or LONG as (milli)seconds since epoch. When storing as DATETIME or LONG you might want to add a second column for storing timezone information, depending on specs.


The way I see it all times/dates should always be stored as UTC only.
Shenghi
Profile Joined August 2010
167 Posts
December 05 2014 19:17 GMT
#11070
On December 06 2014 00:03 Khalum wrote:
Show nested quote +
On December 05 2014 15:00 Shenghi wrote:
On December 05 2014 06:03 Blisse wrote:
On December 05 2014 00:02 Manit0u wrote:
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.


how else do you store dates?

In a DATETIME, DATETIME2 or LONG as (milli)seconds since epoch. When storing as DATETIME or LONG you might want to add a second column for storing timezone information, depending on specs.


The way I see it all times/dates should always be stored as UTC only.

I am inclined to agree with you there. In practice I have always done so. But I think that if I tried, I could come up with situations where storing the timezone information along with a date could be useful.
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Rotodyne
Profile Blog Joined July 2005
United States2263 Posts
Last Edited: 2014-12-06 07:48:48
December 06 2014 07:35 GMT
#11071
Today at work I had to modify the shittiest Drupal plugin ever created. The funny thing is that I was the one that created it a few weeks ago! It was my first Drupal module ever, and it was a super rush job (bad idea!) to get a project out the door immediately. Writing good maintainable code and using best practices was the absolute last thing on my mind. It then turns out we didn't get what we needed done in time, so it is put on hiatus for about three weeks.

Today I paid the price of writing shitty code.

I needed to make some modifications to this module, and it is just an absolute unmaintainable shit show, I am completed appalled every time I look at this code even though it is now working fine. It absolutely had to be working today, which meant even more rushing and made it exponentially worse.

I can't wait to rewrite the entire thing, may even do it on a weekend because I am so disgusted with myself. I am relatively new to programming which is why when I rush things turn to shit, but I do understand what maintainable code looks like, and I know I am capable of it.

Remember guys and gals, writing kinda bad code is fine. But don't write absolutely horrific spaghetti with feces all over it.
I can only play starcraft when I am shit canned. IPXZERG is a god.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2014-12-06 16:04:00
December 06 2014 10:11 GMT
#11072
+ Show Spoiler +
hey guyz, how do i install java EE after installing netbeans+java sdk?

the download page is http://www.oracle.com/technetwork/java/javaee/downloads/index.html

it downloads a folder which has glassfish folder inside (not an executable installer)

do i just stick it in my C:\Program Files\Java\jdk1.8.0_25 folder and its done??

thanks :/

[image loading]


i want to have java EE and be able to go in netbeans new project->web application like https://netbeans.org/kb/docs/web/quickstart-webapps.html describes "Choose File > New Project (Ctrl-Shift-N) from the main menu. Under Categories, select Java Web. Under Projects, select Web Application then click Next."

at the moment in netbeans i just have new project->java-> java application (no "web application")


ehh, i just installed netbeans+EE from the netbeans website instead of java website after installing java SE and it worked. idk how many stuff i have downloaded now -_- ill just do a complete uninstall and reinstall of everything....again...

while im here, anyone happen to be able to rec an uptodate tutorial for java web application/database? ill be on netbeans tutorial site. actually these look pretty comprehensive

whyh every version of mysql i download is bugged T_T


nice so i finally got it working. im up to the part where you design then forwards-engineer a database schema using mysql workbench to be stuck into netbeans. is this normal way to make database for web application? design it in mysql workbench then forwards engineer into netbeans
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
December 06 2014 16:05 GMT
#11073
After trying out the JetBrains products I find myself unable to go back to Netbeans or Eclipse... They seem so slow and bloated now.
Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2014-12-07 04:38:59
December 07 2014 04:38 GMT
#11074
in this is it convention to /> instead of just > ?
+ Show Spoiler +


<a href="#">
<img src="#" id="logo" alt="Affable Bean logo">
</a>

<img src="#" id="logoText" alt="the affable bean">
</div>
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
December 07 2014 04:58 GMT
#11075
On December 07 2014 13:38 FFGenerations wrote:
in this is it convention to /> instead of just > ?
+ Show Spoiler +


<a href="#">
<img src="#" id="logo" alt="Affable Bean logo">
</a>

<img src="#" id="logoText" alt="the affable bean">
</div>

HTML5 doesn't care about closed tags anymore.

But I'd recommend doing it anyway, because you still have to support the crappy versions of web browsers.
Average means I'm better than half of you.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2014-12-07 08:11:45
December 07 2014 08:09 GMT
#11076
Wasn't HTML 5 supposed to be strict XML?
In which case you need to close your tags, even if it's just a single tag:
<img src="#" id="logo" alt="Affable Bean logo"/>


And you really should write proper XML. Everything else is just bound to cause problems.
If you have a good reason to disagree with the above, please tell me. Thank you.
delHospital
Profile Blog Joined December 2010
Poland261 Posts
December 07 2014 10:51 GMT
#11077
On December 07 2014 17:09 spinesheath wrote:
Wasn't HTML 5 supposed to be strict XML?
In which case you need to close your tags, even if it's just a single tag:
<img src="#" id="logo" alt="Affable Bean logo"/>


And you really should write proper XML. Everything else is just bound to cause problems.

What... no... HTML is HTML. XHTML is XHTML. Don't do "/>" in HTML (that is, when you send documents as text/html), do do "/>" in XHTML (application/xhtml+xml). Simple as that.
xtorn
Profile Blog Joined December 2013
4067 Posts
Last Edited: 2014-12-07 11:15:26
December 07 2014 11:09 GMT
#11078
On December 05 2014 00:02 Manit0u wrote:
Damn, I truly hate those "smart" programmers who add 15 unnecessary levels of abstraction... Like, why the hell would you store date in the database as a timestamp? That's stupid right? It's instead better to store it as some strange object (not DateTime, that would be too easy) that has a field which is another object (still not DateTime) and then use helper class to retrieve the date via the date() method, which takes the same arguments as built-in date() function but produces different results... And there is no doumentation or comments in the code for that, obviously.

Seriously, sometimes I'm truly amazed by the way people do things. And it pissess me to no end when I'm forced to spend 4-6 hours on something that should've taken no more than 10 minutes because I have to trace all this bullshit.

i feel your pain


//handle with care
var date = DateTime.ParseExact(GetDateFromUserInput(txtDate.jsonDate.ConvertToDateTimeFromJson()).ConvertToUTCFormatWithTimezone().AddDays(1).AddTicks(-1).ToFormattedUTCStringWithTimestamp().RemoveTimestampIfNotUTC(), format, Cultureinfo.Currentculture);


spot the bug in 10mins, cuz we have to deploy before lunch
you done yet mate
<3 things - Life | Kane | Innovation | Scarlett | Solar | MMA
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
December 07 2014 11:10 GMT
#11079
So they didn't actually fix anything with HTML5. Good that I don't really do that stuff.
Just comparing the size of these two pages says everything...
http://www.w3.org/TR/html5/syntax.html#syntax
http://www.w3.org/TR/html5/the-xhtml-syntax.html
If you have a good reason to disagree with the above, please tell me. Thank you.
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
December 07 2014 16:36 GMT
#11080
On December 07 2014 20:10 spinesheath wrote:
So they didn't actually fix anything with HTML5. Good that I don't really do that stuff.
Just comparing the size of these two pages says everything...
http://www.w3.org/TR/html5/syntax.html#syntax
http://www.w3.org/TR/html5/the-xhtml-syntax.html

what is in an easy way to compare besides downloading them?

im having to make a full featured chat plugin for wordpress with node js with 0 js experiance, its confusing as fuck0o
The harder it becomes, the more you should focus on the basics.
Prev 1 552 553 554 555 556 1032 Next
Please log in or register to reply.
Live Events Refresh
AI Arena Tournament
17:00
Swiss - Round 1
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 837
Tasteless 517
JimRising 516
CosmosSc2 63
StarCraft: Brood War
Britney 19995
Calm 2909
Artosis 697
Shuttle 566
Dewaltoss 108
HiyA 83
Mong 46
Hm[arnc] 18
Noble 6
Dota 2
qojqva2962
420jenkins335
monkeys_forever129
canceldota41
Counter-Strike
fl0m3249
Fnx 743
Super Smash Bros
Chillindude18
Heroes of the Storm
Liquid`Hasu1292
Trikslyr101
Other Games
Grubby7387
summit1g4536
B2W.Neo1414
Mlord436
XaKoH 166
QueenE43
Organizations
Heroes of the Storm
Heroes of the Storm3566
Other Games
EGCTV1555
StarCraft 2
StarCraft1503
StarCraft: Brood War
Afreeca ASL 568
Other Games
BasetradeTV225
angryscii39
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 98
• EnkiAlexander 55
• printf 36
• Adnapsc2 7
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• Airneanach24
• FirePhoenix12
• Pr0nogo 6
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Other Games
• imaqtpie832
• Shiphtur173
Upcoming Events
OSC
45m
Sparkling Tuna Cup
14h 15m
WardiTV Invitational
15h 15m
ByuN vs Percival
Cure vs Classic
Shopify Rebellion Sundays
19h 15m
Spirit vs Mixu
Clem vs TBD
RSL Revival
20h 15m
Serral vs Rogue
BlizzCon
22h 45m
IdrA vs MC
Replay Cast
1d 4h
Afreeca Starleague
1d 14h
Light vs JyJ
Soulkey vs hero
WardiTV Weekly
1d 15h
Monday Night Weeklies
1d 20h
[ Show More ]
Afreeca Starleague
2 days
Snow vs Shinee
Shine vs EffOrt
GSL
2 days
PiGosaur Cup
3 days
The PondCast
3 days
Kung Fu Cup
3 days
Replay Cast
4 days
KCM Race Survival
4 days
IntoTheTV X SOOP
4 days
Replay Cast
5 days
IntoTheTV X SOOP
5 days
Replay Cast
6 days
GSL
6 days
Liquipedia Results

Completed

Acropolis #5 - TRS
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
Acropolis #5
RSL Revival: Season 6
Calamity Invitational
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Blizzard Classic Cup 2026
Acropolis #5 - GSA
Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
Blizzard Classic Cup 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 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.