• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 04:05
CEST 10:05
KST 17:05
  • 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
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun12[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists22[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
RSL Revival: Season 5 - Qualifiers and Main Event4Code S Season 1 (2026) - RO12 Results02026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15
StarCraft 2
General
Code S Season 1 (2026) - RO12 Results Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid
Tourneys
RSL Revival: Season 5 - Qualifiers and Main Event GSL Code S Season 1 (2026) SC2 INu's Battles#15 <BO.9 2Matches> WardiTV Spring Cup SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Pros React To: Leta vs Tulbo (ASL S21, Ro.8) [BSL22] RO16 Group A - Sunday 21:00 CEST [BSL22] RO16 Group B - Saturday 21:00 CEST
Tourneys
[BSL22] RO16 Group Stage - 02 - 10 May Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro8 Day 2
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Daigo vs Menard Best of 10 Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Diablo IV
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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 TL Mafia Community Thread Five o'clock TL Mafia
Community
General
European Politico-economics QA Mega-thread US Politics Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1643 users

The Big Programming Thread - Page 593

Forum Index > General Forum
Post a Reply
Prev 1 591 592 593 594 595 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.
bangsholt
Profile Joined June 2011
Denmark138 Posts
February 23 2015 19:15 GMT
#11841
On February 24 2015 02:46 windzor wrote:
Show nested quote +
On February 24 2015 02:37 travis wrote:
if I used serialization to save data from my program to a file, will that file be readable/editable in some way that would allow users to manipulate the saved states? because I don't want that.

do I specifically need to find a way to save my files as encrypted to avoid it?


If the user have access rights to edit the file he can do it. There is nothing you can do about that.

What you can do is create a checksum of the file and use that to detect if the user has changed the file. If so, you can yell at the user and say to stop editing that file.


It depends on how you serialize it. If you dump it into a binary format, it's not editable for your average user, nor is it for the more advanced one as you'll have to figure out what it means. If you dump it in JSON/XML well... Those are designed to be read by humans, soooo :o)
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2015-02-23 19:27:47
February 23 2015 19:23 GMT
#11842
I have a confession to make. I messed up Fizzbuzz. I didn't notice the part where it asked you to print a number T_T

And I tried to optimize prematurely looking for an elegant solution. Sad.

Please whisper sweet things into my ear that I usually read instructions more carefully, doublecheck my work, and that I like scalable programs.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Cyx.
Profile Joined November 2010
Canada806 Posts
February 24 2015 01:52 GMT
#11843
On February 24 2015 04:23 obesechicken13 wrote:
I have a confession to make. I messed up Fizzbuzz. I didn't notice the part where it asked you to print a number T_T

And I tried to optimize prematurely looking for an elegant solution. Sad.

Please whisper sweet things into my ear that I usually read instructions more carefully, doublecheck my work, and that I like scalable programs.

Ahahah man you should have seen me take ten minutes to come up with a function that returns the max of three integers... It happens to everyone :D
Manit0u
Profile Blog Joined August 2004
Poland17741 Posts
February 24 2015 09:51 GMT
#11844
Rant...

I somehow truly hate it when people write


null === variable


seems so wrong...

/rant
Time is precious. Waste it wisely.
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
February 24 2015 10:39 GMT
#11845
On February 24 2015 18:51 Manit0u wrote:
Rant...

I somehow truly hate it when people write


null === variable


seems so wrong...

/rant

wtf why... .WHY T_T

The harder it becomes, the more you should focus on the basics.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2015-02-24 10:44:31
February 24 2015 10:42 GMT
#11846
@blisse
seq is short for sequence, it's a library for manipulating sequences of types.

jeh is my initials, i just put trifles in
there that are not big enough for their
own namespace, but fear the global one.
rewording of enable_if_t (select_if),
to_string for types, abstract / deconstruct.
conspired against by a confederacy of dunces.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 24 2015 10:50 GMT
#11847
On February 24 2015 18:51 Manit0u wrote:
Rant...

I somehow truly hate it when people write


null === variable


seems so wrong...

/rant


One of my colleagues likes to do those yoda conditions. I always refactor them away when I come across them.

I think it's an abomination that originates from the Java world where e.g. someString.equals("foo") could lead to a null pointer exception while "foo".equals(someString) couldn't. Either way, it's so unintuitive and against the way the brain processes information that there is no reason to ever use those.... well, ok, maybe in soviet russia null is variable.
windzor
Profile Joined October 2010
Denmark1013 Posts
February 24 2015 11:06 GMT
#11848
On February 24 2015 04:15 bangsholt wrote:
Show nested quote +
On February 24 2015 02:46 windzor wrote:
On February 24 2015 02:37 travis wrote:
if I used serialization to save data from my program to a file, will that file be readable/editable in some way that would allow users to manipulate the saved states? because I don't want that.

do I specifically need to find a way to save my files as encrypted to avoid it?


If the user have access rights to edit the file he can do it. There is nothing you can do about that.

What you can do is create a checksum of the file and use that to detect if the user has changed the file. If so, you can yell at the user and say to stop editing that file.


It depends on how you serialize it. If you dump it into a binary format, it's not editable for your average user, nor is it for the more advanced one as you'll have to figure out what it means. If you dump it in JSON/XML well... Those are designed to be read by humans, soooo :o)


No binary files are editable for all users. Just doesn't mean that what they edit are usable in any way or form. It also can make the serialized data unusable. Travis wants to make sure only reliable edits are used by the application.

Not all binary files are all binary data. PDF files are binary files, but I edit them all the time in hand at work to test stuff because big part of the PDF format is non-binary text.
Yeah
Gowerly
Profile Blog Joined July 2011
United Kingdom916 Posts
February 24 2015 11:19 GMT
#11849
On February 24 2015 19:50 Morfildur wrote:
Show nested quote +
On February 24 2015 18:51 Manit0u wrote:
Rant...

I somehow truly hate it when people write


null === variable


seems so wrong...

/rant


One of my colleagues likes to do those yoda conditions. I always refactor them away when I come across them.

I think it's an abomination that originates from the Java world where e.g. someString.equals("foo") could lead to a null pointer exception while "foo".equals(someString) couldn't. Either way, it's so unintuitive and against the way the brain processes information that there is no reason to ever use those.... well, ok, maybe in soviet russia null is variable.

It's more than that. Older compilers would happily compile:

if (myVar = cMyTestComparator)
{
...
}

without error or warning.

So, people reversed them so that the constant was on the left, which would cause the code to fail to compile.
These days compilers are more likely to catch them, but people are still wont to put things like

if ((myVar = doSomethingObnoxious()) == NULL)

or whatever in their code, so I'm not against Yoda conditioning. It's not like it takes longer to run and it's not exactly unreadable.
I will reduce you to a series of numbers.
Manit0u
Profile Blog Joined August 2004
Poland17741 Posts
Last Edited: 2015-02-24 11:37:00
February 24 2015 11:36 GMT
#11850
It's not unreadable, but feels super wrong when you're reading code...
Time is precious. Waste it wisely.
ferdkuh
Profile Joined January 2013
10 Posts
February 24 2015 15:29 GMT
#11851
I've been playing around with the meteor framework for javascript lately and was really impressed by on feature of it called Livequery. It is essentially a database connector that allows for your querie results to be automatically updated as the data changes. It works really nice and is extremely pleasant to use.

Now my question is: Is anybody of you aware of something similar for C/Java/.Net ?
mariiopac
Profile Joined February 2015
Italy3 Posts
February 24 2015 16:44 GMT
#11852
--- Nuked ---
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
February 24 2015 18:46 GMT
#11853
On February 24 2015 18:51 Manit0u wrote:
Rant...

I somehow truly hate it when people write


null === variable


seems so wrong...

/rant


You wouldn't enjoy reading my code then, I do that all the time. The first programming teacher I had taught us that for exactly the reasons Gowerly described. The compiler might be perfectly capable of detecting it, but it's a habit now, and doing
variable == null
feels wrong to me so I correct it when I accidentally type it that way.
Artesimo
Profile Joined February 2015
Germany572 Posts
Last Edited: 2015-02-24 19:12:34
February 24 2015 19:10 GMT
#11854
Not really a programming question, but is there a programm that gives a user the ability to grant another person remote acess to their computer and control their mouse etc. thats so easy to use that even a toddler would be able to use it. Even if it isnt free, I dont care anymore at this point. I just spend over 90min on trying to assist my grandpa on downloading a programm to open zip-archives without any success, just to realize that he already has 7-zip installed(not in german ofc, that would be silly for someone that only speaks german properly) but him still being unable to open the files in the archive since some photo-stuff programm from hell seems to be set as default programm to open this files(some charts, exel I assume, he propably set the photo-programm as default programm by accident). Since years I am trying to teach him some basic stuff, whats folders etc. and some basic terminology so he wouldnt confuse me when he explains a problem completely wrong. Hes not stupid or demented, hes usually pretty smart but when it comes to computers he is just so clumsy, despite trying his best. I am the only one who has patience to deal with his problems but I need 2 hours one way to get to him and solve his problem in 15min, including writing it down for him step by step. He still uses XP, horribly messed up his interface and therefore I am no longer able to guide him through, I just can guess. I just want a programm where he just has to double-click something to grant me remote acess to his machine, maybe have him allowing me to controll his mouse, but everything has to function simple. Setup can be more complicated as long as it only needs to be done once... please tell me that there is such a programm because I almost lost it during this phonecall.

TLDR:
- need a programm for granting a specific user remote acess
- foolproof
- one time setup
- user who gets remote acess must be able to control the mouse etc. in a easy way and it should be visible for the one who granted remote acess
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
February 24 2015 19:11 GMT
#11855
meh it feels super wierd.

besides, there aren't any scenario's anymore where we would want to use those old crappy versions of compilers right?
The harder it becomes, the more you should focus on the basics.
Kasto
Profile Joined May 2010
473 Posts
February 24 2015 19:25 GMT
#11856
On February 25 2015 04:10 Artesimo wrote:
+ Show Spoiler +

Not really a programming question, but is there a programm that gives a user the ability to grant another person remote acess to their computer and control their mouse etc. thats so easy to use that even a toddler would be able to use it. Even if it isnt free, I dont care anymore at this point. I just spend over 90min on trying to assist my grandpa on downloading a programm to open zip-archives without any success, just to realize that he already has 7-zip installed(not in german ofc, that would be silly for someone that only speaks german properly) but him still being unable to open the files in the archive since some photo-stuff programm from hell seems to be set as default programm to open this files(some charts, exel I assume, he propably set the photo-programm as default programm by accident). Since years I am trying to teach him some basic stuff, whats folders etc. and some basic terminology so he wouldnt confuse me when he explains a problem completely wrong. Hes not stupid or demented, hes usually pretty smart but when it comes to computers he is just so clumsy, despite trying his best. I am the only one who has patience to deal with his problems but I need 2 hours one way to get to him and solve his problem in 15min, including writing it down for him step by step. He still uses XP, horribly messed up his interface and therefore I am no longer able to guide him through, I just can guess. I just want a programm where he just has to double-click something to grant me remote acess to his machine, maybe have him allowing me to controll his mouse, but everything has to function simple. Setup can be more complicated as long as it only needs to be done once... please tell me that there is such a programm because I almost lost it during this phonecall.

TLDR:
- need a programm for granting a specific user remote acess
- foolproof
- one time setup
- user who gets remote acess must be able to control the mouse etc. in a easy way and it should be visible for the one who granted remote acess



I've used Teamviewer in a similar situation. Not sure if it'll have any problems with XP but give it a try.
Ropid
Profile Joined March 2009
Germany3557 Posts
February 24 2015 19:26 GMT
#11857
@Artesimo: that stuff is built into Windows, but I don't know how it works. Search for "Remote Assistance". There's also "Remote Desktop", but that's not quite what you want, I think.
"My goal is to replace my soul with coffee and become immortal."
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 24 2015 19:34 GMT
#11858
On February 25 2015 04:25 Kasto wrote:
Show nested quote +
On February 25 2015 04:10 Artesimo wrote:
+ Show Spoiler +

Not really a programming question, but is there a programm that gives a user the ability to grant another person remote acess to their computer and control their mouse etc. thats so easy to use that even a toddler would be able to use it. Even if it isnt free, I dont care anymore at this point. I just spend over 90min on trying to assist my grandpa on downloading a programm to open zip-archives without any success, just to realize that he already has 7-zip installed(not in german ofc, that would be silly for someone that only speaks german properly) but him still being unable to open the files in the archive since some photo-stuff programm from hell seems to be set as default programm to open this files(some charts, exel I assume, he propably set the photo-programm as default programm by accident). Since years I am trying to teach him some basic stuff, whats folders etc. and some basic terminology so he wouldnt confuse me when he explains a problem completely wrong. Hes not stupid or demented, hes usually pretty smart but when it comes to computers he is just so clumsy, despite trying his best. I am the only one who has patience to deal with his problems but I need 2 hours one way to get to him and solve his problem in 15min, including writing it down for him step by step. He still uses XP, horribly messed up his interface and therefore I am no longer able to guide him through, I just can guess. I just want a programm where he just has to double-click something to grant me remote acess to his machine, maybe have him allowing me to controll his mouse, but everything has to function simple. Setup can be more complicated as long as it only needs to be done once... please tell me that there is such a programm because I almost lost it during this phonecall.

TLDR:
- need a programm for granting a specific user remote acess
- foolproof
- one time setup
- user who gets remote acess must be able to control the mouse etc. in a easy way and it should be visible for the one who granted remote acess



I've used Teamviewer in a similar situation. Not sure if it'll have any problems with XP but give it a try.



TeamViewer is the most common choice. Easy to use, requires no installation on the other side, you just need to make them execute a link and then ask them for an ID the program gives them and you can instantly connect to their PC and control it. No router configuration or such is required.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-02-24 22:07:15
February 24 2015 20:48 GMT
#11859
Another vote for TeamViewer, RDP doesn't let the other user see the screen while you're using it (locked out).

On February 24 2015 19:42 nunez wrote:
@blisse
seq is short for sequence, it's a library for manipulating sequences of types.

jeh is my initials, i just put trifles in
there that are not big enough for their
own namespace, but fear the global one.
rewording of enable_if_t (select_if),
to_string for types, abstract / deconstruct.


was just wondering because my work has some folders called like /weh/ and I was wondering if they were related :p


Is there an option with SASS (or maybe I'll switch to LESS) that takes all the scss files I have and outputs it in one css file? I usually have like 1 css per scss file for the build system, but I would like to decouple that kind of dependency on the scss files.
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17741 Posts
February 24 2015 23:30 GMT
#11860
On February 25 2015 05:48 Blisse wrote:
Another vote for TeamViewer, RDP doesn't let the other user see the screen while you're using it (locked out).

Show nested quote +
On February 24 2015 19:42 nunez wrote:
@blisse
seq is short for sequence, it's a library for manipulating sequences of types.

jeh is my initials, i just put trifles in
there that are not big enough for their
own namespace, but fear the global one.
rewording of enable_if_t (select_if),
to_string for types, abstract / deconstruct.


was just wondering because my work has some folders called like /weh/ and I was wondering if they were related :p


Is there an option with SASS (or maybe I'll switch to LESS) that takes all the scss files I have and outputs it in one css file? I usually have like 1 css per scss file for the build system, but I would like to decouple that kind of dependency on the scss files.


With LESS you can use less compiler (npm install -g less clean-css) to get a minified single css file out of as many less files as you want. All you have to do is create some main.less file and @import all the other files in it. It's just one of the ways to do it. You can also use stuff like Less.php if you prefer it this way.

It's the same for SASS really:
http://stackoverflow.com/questions/5571477/use-multiple-sass-files
Time is precious. Waste it wisely.
Prev 1 591 592 593 594 595 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 55m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Horang2 1891
firebathero 523
Shine 286
Zeus 240
PianO 183
Aegong 97
Killer 70
Backho 67
ToSsGirL 57
Dewaltoss 52
[ Show more ]
EffOrt 46
Hm[arnc] 41
910 24
JulyZerg 13
scan(afreeca) 12
Leta 8
NotJumperer 6
Dota 2
NeuroSwarm176
League of Legends
JimRising 594
Counter-Strike
Stewie2K1504
edward131
Other Games
summit1g6350
gofns3394
C9.Mang0345
Happy338
monkeys_forever300
Sick240
crisheroes131
ToD28
Organizations
Other Games
gamesdonequick726
Dota 2
PGL Dota 2 - Main Stream93
StarCraft: Brood War
UltimateBattle 41
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• Sammyuel 37
• Adnapsc2 6
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• TFBlade1587
• Jankos610
• Stunt532
Upcoming Events
Replay Cast
55m
RSL Revival
1h 55m
Classic vs GgMaChine
Rogue vs Maru
WardiTV Invitational
2h 55m
Percival vs Shameless
ByuN vs YoungYakov
SC Evo League
5h 55m
IPSL
7h 55m
Ret vs Art_Of_Turtle
Radley vs TBD
BSL
10h 55m
Replay Cast
15h 55m
RSL Revival
1d 1h
herO vs TriGGeR
NightMare vs Solar
uThermal 2v2 Circuit
1d 5h
BSL
1d 10h
[ Show More ]
IPSL
1d 10h
eOnzErG vs TBD
G5 vs Nesh
Patches Events
1d 15h
Replay Cast
2 days
Wardi Open
2 days
Afreeca Starleague
2 days
Jaedong vs Light
Monday Night Weeklies
2 days
Replay Cast
2 days
Sparkling Tuna Cup
3 days
Afreeca Starleague
3 days
Snow vs Flash
WardiTV Invitational
3 days
GSL
4 days
Classic vs Cure
Maru vs Rogue
GSL
5 days
SHIN vs Zoun
ByuN vs herO
OSC
5 days
Replay Cast
5 days
Escore
6 days
The PondCast
6 days
WardiTV Invitational
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Escore Tournament S2: W5
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 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.