• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:00
CEST 03:00
KST 10: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
[ASL22] Ro8 Preview: In A Tizzy3[ASL22] Ro16 Preview: Holy Diver5[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9
Community News
BSL Season 234Weekly Cups (Sep 7-12): SHIN, ByuN, MaxPax double down1StarCraft open world shooter announced at BlizzCon101Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?179
StarCraft 2
General
Balance hotfix patch 5.0.16b (July 16) StarCraft open world shooter announced at BlizzCon SC4ALL II: StarCraft 2 Player Announcement 8/8 The Death of Cheese: From a Professional Cheeser Yamato Cup Series
Tourneys
2026 GSTL Announcement Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 6 - Qualifiers and Main Event RSL goes to London! 2026 Offline Finals Nov 21-22 SC2 AI Tournament 2026 Fall
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 544 Double Trouble The PondCast: SC2 News & Results Mutation # 543 Enhanced Defenses Mutation # 542 The Ascended
Brood War
General
Syncronization issues and can't find games [ASL22] Ro8 Preview: In A Tizzy BSL Season 23 Bot on ladder an AI researcher's take on the ladder bot
Tourneys
[BSL23] SM: Ret vs TerrOr -> DragOn vs StRyKeR [Megathread] Daily Proleagues [ASL22] Ro16 Group D [ASL22] Ro16 Group B
Strategy
Cliff Jump Revisited (1 in a 1000 strategy) Replay Review Process - What do you do? Simple Questions, Simple Answers Odyssey Mineral Stack Saturation
Other Games
General Games
Nintendo Switch Thread Warcraft III: The Frozen Throne Stormgate/Frost Giant Megathread EVE Corporation Diablo IV
Dota 2
Dota 2 Champions League Season 3 Begins April 25! Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish
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 Things Aren’t Peaceful in Palestine All you football fans (soccer)! Russo-Ukrainian War Thread Canadian Politics Mega-thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Movie Discussion! [Manga] One Piece Diablo Animated Series on Netflix
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
Recent Gifted Posts
Blogs
Gaming Intensity, Problemati…
TrAiDoS
38 yo Retired SWE loo…
PurE)Rabbit-SF
Can Bots Beat Pros?? Starcr…
namkraft
[meme] I finally understa…
LUCKY_NOOB
Regacy Esports:Our Goa…
regacyesports
Dreaming of BW patches (mod…
c3rberUs
Customize Sidebar...

Website Feedback

Closed Threads



Active: 10538 users

The Big Programming Thread - Page 700

Forum Index > General Forum
Post a Reply
Prev 1 698 699 700 701 702 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.
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
Last Edited: 2016-01-07 22:32:50
January 07 2016 22:32 GMT
#13981
On January 08 2016 07:15 emperorchampion wrote:

- Try to replace loops with indexing, much faster and easier, loops should be the last option imo, built in functions or index are the way to go


If you ignore all other advice, heed this. In the short run, it will merely make your code shorter and easier to read. In the long run, MATLAB functions tend to start taking days or weeks after the scope starts getting out of control, so thinking in terms of speed of computation early means you do not have to relearn MATLAB at a later point.
Any sufficiently advanced technology is indistinguishable from magic
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
Last Edited: 2016-01-07 23:48:47
January 07 2016 23:48 GMT
#13982
Another +1 for avoiding loops. Almost anytime you are tempted to use a loop in matlab, theres some matrix operation which is 1000x faster, is cleaner code, and makes you look more pro.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
tofucake
Profile Blog Joined October 2009
Hyrule19257 Posts
January 08 2016 01:04 GMT
#13983
On January 08 2016 07:02 Manit0u wrote:
Show nested quote +
On January 08 2016 06:36 travis wrote:
I already read that. I think I get a grasp of how it works, for the most part. And why, for the most part. I just don't see the advantage of doing it this way instead of just having a keyword. It actually seems like it's making it more complicated instead of less, which is something I haven't seen in python so far.

Maybe this is a question I will need to ask myself in 6 months.


You think this is complicated? PHP has both self and this. And in JavaScript you often see stuff like that:


var self = this;


Try figuring those out

Edit:
Not for the faint of heart: http://alistapart.com/article/getoutbindingsituations

self for static and this for objective

bam
Liquipediaasante sana squash banana
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 08 2016 15:43 GMT
#13984
here's a question
why do people bother with programs like bootstrap
why is that better than just writing your html/css yourself? Or is there something more that it does ?
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
January 08 2016 15:49 GMT
#13985
Usually just provides a lot of out of the box functionality without having to do much work, it'll get you results faster than figuring everything out yourself.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
tofucake
Profile Blog Joined October 2009
Hyrule19257 Posts
January 08 2016 16:16 GMT
#13986
We use bootstrap at my work because it let's us do styling well but quickly, and we can spend more time on the actual business logic and implementing new functionality.
Liquipediaasante sana squash banana
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 08 2016 16:44 GMT
#13987
I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2016-01-08 17:16:29
January 08 2016 16:49 GMT
#13988
Things like bootstrap and jQuery are useful because of many reasons:

1. Uniform way of styling/scripting across projects.
2. Lots of help available online.
3. Lets you avoid a lot of tarpits (mainly cross-browser functionality and legacy browser support). Also, since they're so popular they've been tested extensively and already fixed stuff you didn't even know could be a problem.
4. Easier to find new people for the project (higher chance of finding someone who has already worked with those frameworks than someone who'll pick up your own stuff quickly enough without applying additional burden to the rest of the team).
5. Huge number of "out-of-the-box" features.

Just to name a few.

Although we're currently debating switching from bootstrap to foundation all of the above still applies.

Here's a brief tutorial on how grid frameworks work (and why people use them to develop front-end fast across mobile and desktop):

Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19257 Posts
January 08 2016 18:06 GMT
#13989
On January 09 2016 01:44 travis wrote:
I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?

Yeah, basic bootstrap sites have very common appearances, but it's really simple to customize too.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
January 08 2016 18:33 GMT
#13990
On January 09 2016 03:06 tofucake wrote:
Show nested quote +
On January 09 2016 01:44 travis wrote:
I have read several posts that say that unless you put in the extra work to customize the code, "all bootstrap sites look the same". Is there any truth to that?

Yeah, basic bootstrap sites have very common appearances, but it's really simple to customize too.


There's actually nothing wrong with that. The design is simple yet good looking so even the sites with basic bootstrap look well. Also, it's good for the UX since the users get accustomed to the elements, don't have to look for things and instantly know what's what.

Anyway, like it was mentioned, it's really easy to customize bootstrap to suit your needs (you can even do it on their website and download already modified code). You can get all the matching colors and proper stuff here and use it to make a really nice looking layout with bootstrap.
Time is precious. Waste it wisely.
myRZeth
Profile Joined June 2011
Germany1047 Posts
January 08 2016 18:37 GMT
#13991
Is there anyone in here who programs in Racket?

I'd appreciate a PM if yes.

Thanks, awesome community.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
January 09 2016 07:12 GMT
#13992
Might be a bit off topic or at least tangential, but does anyone have any ideas about marketing a website to letsplayers and letsplay viewers?

I've launched my private project LetsPlayDB into essentially open beta yesterday, but I'm still unsure on how to get the initial boost I need to take off. Without letsplayers, people won't bother to search. Without people to search, letsplayers won't sign up. I've posted it to /r/letsplay and got a few channels to sign up, but by far not enough.

For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
January 10 2016 19:44 GMT
#13993
After a full weekend of learning openGL my brain is fried after trying to understand how all of this works.
The harder it becomes, the more you should focus on the basics.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2016-01-10 21:25:22
January 10 2016 21:24 GMT
#13994
On January 09 2016 16:12 Morfildur wrote:
Might be a bit off topic or at least tangential, but does anyone have any ideas about marketing a website to letsplayers and letsplay viewers?

I've launched my private project LetsPlayDB into essentially open beta yesterday, but I'm still unsure on how to get the initial boost I need to take off. Without letsplayers, people won't bother to search. Without people to search, letsplayers won't sign up. I've posted it to /r/letsplay and got a few channels to sign up, but by far not enough.

For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.


Angular starts to shine when you have a 2-system setup. Where one system has the primary db and does all the heavy lifting but doesn't really have a front and the other one only has db containing some user data and very basic controllers and is nothing more than a front where you use angular to display stuff you get from the other system.

This is actually pretty neat for front/back-end separation and it much reduces the load on your system (since the back-end stuff is set up to only receive json and only from ip's where your front-facing systems reside). All the front-facing systems really do is send request to the back-end system, get json in response and use angular to display it. Additional security is nice too.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19257 Posts
January 12 2016 01:59 GMT
#13995
So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.

The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.

Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2016-01-12 04:57:59
January 12 2016 04:57 GMT
#13996
On January 12 2016 10:59 tofucake wrote:
So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.

The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.

Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.


That's cool. Let me know if you need any help with Symfony. For a year now most of the projects our company is doing are in Symfony 2.7+ and PHP 5.5+. It's a pleasure to work with it.
Time is precious. Waste it wisely.
coolprogrammingstuff
Profile Joined December 2015
906 Posts
January 12 2016 09:18 GMT
#13997
On January 08 2016 05:50 travis wrote:
I have a couple questions about the commonly seen "self" parameter in python

It seems to have the same purpose as "this" in java. except from what I read, self isn't actually a keyword, so it can be anything

so a couple questions I have - is this parameter required in all methods you write in python?
is this parameter basically just saying "from now on this is how this method can refer to itself"
and finally - why? why not just use "this" like in java?


It is convention. You can use "this" all you like, but it'd be bad practice in python.

Python didn't just use "self" to be cool to distinguish itself from java -some OO languages use this, others self. This deviates all the way back to two of the first OO programming languages - Simula (this), smalltalk (self). A bit more complicated than that, and I'm not too knowledgable about it either, but yeah!
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2016-01-12 10:39:18
January 12 2016 10:38 GMT
#13998
On January 12 2016 10:59 tofucake wrote:
So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.

The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.

Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.


Been there, done that. End product was worse than the previous product.

In my previous company we wanted to move away from the old frontend, which was essentially entirely custom made. The new project was supposed to be all OOP, SOA, TDD and stuff. I was only involved in the latter parts of the rework, but essentially the new website was slow as hell, the structure was even more confusing since everything was configurable and the UI that was supposed to be identical to the old ended up much less userfriendly. The rework too 6 developers about a full year, if not a bit more, and for me the final product was unacceptable with page loading speeds in the range of one second for the simpler pages - after the extended 10 person team, the part where I got involved, spent two weeks optimizing everything, apart from the underlying Kohana framework which we weren't allowed to fix as to maintain compatibility to future updates.

I switched to my current company, for which I worked a few years back, on the promise of scrapping the old websites and creating something new. The old pages were basically procedural with all the functions in a file literally called functions.php. I came in when the one developer plus two student assistants already laid most of the foundation and I mostly had to add some of the more complex stuff like payment connectors and such. The new product is using zend framework 2 running on the azure cloud with lots of factories and stuff - and it's ugly, slow (page loading speed of 2s and more) and big parts of the code are huge messes. Launch is on the first of February and I wouldn't use the product in it's current state even if the stuff we're selling was free.

I think scrapping old stuff and creating it anew is overrated.
It's fun though, I do it with my private projects all the time, which is one reason why 99% of them never see the light of day.
berated-
Profile Blog Joined February 2007
United States1134 Posts
January 12 2016 16:19 GMT
#13999
On January 12 2016 19:38 Morfildur wrote:
Show nested quote +
On January 12 2016 10:59 tofucake wrote:
So last week we got the green light to start fresh with the new version of our website, and today we had a database design meeting. I'm excited that we are moving from a heavily modded and unupgradable CakePHP 1.something, weird ajax, some sort of Symfony, bootstrap AND random SASS, jQuery, and PHP 5.3 all run on composer and compass to Symfony 3, PHP7, AdminLTE/Bootstrap, bower/gulp, and maybe nginx.

The admin section of prod alone is a nightmare to debug, as the way it's setup is such that all debugging is a pain (tail -F /var/log/httpd/error_log) and called pages cannot execute JS, which means all the control JS needs to be in the calling document, not the return result. It's so dumb how it's currently done.

Add to that the fact that we outsourced the development of the mobile site to another company and they royally fucked it up, and what we get is a very happy team of developers. Going through the DB today and saying "yes we can axe this 13gb table" was awesome.


Been there, done that. End product was worse than the previous product.

In my previous company we wanted to move away from the old frontend, which was essentially entirely custom made. The new project was supposed to be all OOP, SOA, TDD and stuff. I was only involved in the latter parts of the rework, but essentially the new website was slow as hell, the structure was even more confusing since everything was configurable and the UI that was supposed to be identical to the old ended up much less userfriendly. The rework too 6 developers about a full year, if not a bit more, and for me the final product was unacceptable with page loading speeds in the range of one second for the simpler pages - after the extended 10 person team, the part where I got involved, spent two weeks optimizing everything, apart from the underlying Kohana framework which we weren't allowed to fix as to maintain compatibility to future updates.

I switched to my current company, for which I worked a few years back, on the promise of scrapping the old websites and creating something new. The old pages were basically procedural with all the functions in a file literally called functions.php. I came in when the one developer plus two student assistants already laid most of the foundation and I mostly had to add some of the more complex stuff like payment connectors and such. The new product is using zend framework 2 running on the azure cloud with lots of factories and stuff - and it's ugly, slow (page loading speed of 2s and more) and big parts of the code are huge messes. Launch is on the first of February and I wouldn't use the product in it's current state even if the stuff we're selling was free.

I think scrapping old stuff and creating it anew is overrated.
It's fun though, I do it with my private projects all the time, which is one reason why 99% of them never see the light of day.


+1 - rewrites are definitely.. interesting.

The problem I have with them most of the time is the fallacy that it will be easier to understand, combined with the failure to understand the current product. If you can't dive in and figure out the current one, I've never been quite certain how one thinks they will rewrite it and get it correct.
mTwRINE
Profile Joined February 2006
Germany318 Posts
January 12 2016 17:25 GMT
#14000
On January 09 2016 16:12 Morfildur wrote:
For those interested, the website is done in Node.JS using Express - my first ever Node.JS project. Backend is MongoDB, also a first for me. Frontend is of course using bootstrap, since I'm not a webdesigner, and a tiny bit of AngularJS - not a huge fan of AngularJS so far, it seems to be the same as jquery ui widgets, just with added syntax, but it seems to do it's job.


You are not using any Angular features (directives like ng-repeat, ng-model for example). Right now its just a container for standard jQuery. See “Thinking in AngularJS” if I have a jQuery background?
As you said it does its job, but if you want some input on how to get there, I could give you some pointers.
Prev 1 698 699 700 701 702 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
2026 GSTL: Playoffs Round 2
CranKy Ducklings113
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 117
StarCraft: Brood War
Rain 2584
GuemChi 1871
Artosis 700
Shuttle 483
ggaemo 44
Dota 2
monkeys_forever481
NeuroSwarm180
League of Legends
Doublelift6469
Super Smash Bros
hungrybox472
Heroes of the Storm
Khaldor243
Other Games
summit1g10961
Liquid`RaSZi1913
JimRising 568
Maynarde193
Livibee119
Mew2King56
ViBE36
[ Show 13 non-featured ]
StarCraft 2
• Hupsaiya 98
• mYiSmile110
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21762
Other Games
• Scarra1022
• imaqtpie505
Upcoming Events
Afreeca Starleague
9h
Shine vs Rush
WardiTV Weekly
10h
Monday Night Weeklies
15h
Sparkling Tuna Cup
1d 9h
Afreeca Starleague
1d 9h
Light vs EffOrt
OSC
1d 11h
PiGosaur Cup
1d 23h
Kung Fu Cup
2 days
The PondCast
3 days
Replay Cast
3 days
[ Show More ]
Korean StarCraft League
5 days
CranKy Ducklings
5 days
GSL
6 days
Yamato Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Super Anchor Qualifying S3
Blizzard Classic Cup 2026
Big Dog Cup 2026 Div 1

Ongoing

ASL Season 22
CSL 2026 AUTUMN (S22)
Acropolis #5
Acropolis #5 - GSA
Calamity Invitational
Logitech G Play Connect 2026
SL StarSeries Fall 2026
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

Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
Copium Cup
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
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.