• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 20:27
CET 02:27
KST 10:27
  • 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
ByuL: The Forgotten Master of ZvT28Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
Terran AddOns placement How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker ByuL: The Forgotten Master of ZvT Oliveira Would Have Returned If EWC Continued
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament SEL Doubles (SC Evo Bimonthly) WardiTV Team League Season 10 RSL Season 4 announced for March-April
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 515 Together Forever Mutation # 514 Ulnar New Year Mutation # 513 Attrition Warfare
Brood War
General
Soma Explains: JD's Unrelenting Aggro vs FlaSh Recent recommended BW games TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02
Tourneys
BWCL Season 64 Announcement The Casual Games of the Week Thread [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Battle Aces/David Kim RTS Megathread Diablo 2 thread Nintendo Switch Thread Path of Exile Beyond All Reason
Dota 2
The Story of Wings Gaming 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 TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine UK Politics Mega-thread YouTube Thread Mexico's Drug War
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1976 users

The Big Programming Thread - Page 708

Forum Index > General Forum
Post a Reply
Prev 1 706 707 708 709 710 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.
NovemberstOrm
Profile Blog Joined September 2011
Canada16217 Posts
March 06 2016 08:22 GMT
#14141
On March 05 2016 21:41 Manit0u wrote:
Show nested quote +
On March 05 2016 16:14 NovemberstOrm wrote:
I'm creating an application in VB.net, I need to have a next record/prev record button, I'm using hashtables atm, any ideas?


Can't you just call next() and previous() on a collection?

Show nested quote +
On March 05 2016 20:54 tofucake wrote:
On March 05 2016 13:32 Manit0u wrote:
What do you mean by "text not written in Windows"? I've never had problems with assetic on either Linux or Windows.

Here are some things that might help you:
http://stackoverflow.com/questions/19219578/nginx-and-css-issue

Also: Why Chromium? T_T


.align-go {
transform: translateY(75%);
-webkit-transform: translateY(75%);
}

^ was written in Windows and works. Anything else I type in Arch goes to null.


sendfile off worked though, thanks


Really strange...

In the meantime, I've found another cool article/FAQ on Nginx:
https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/


Thanks I figured it out!
Moderatorlickypiddy
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
Last Edited: 2016-03-08 12:47:33
March 08 2016 12:45 GMT
#14142
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2016-03-08 12:58:06
March 08 2016 12:57 GMT
#14143
On March 08 2016 21:45 Manit0u wrote:
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

+ Show Spoiler +

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I probably would have walked out. Those are terrible questions with no real world application. Well, #5 is sort of relevant since such algorithms can easily lead to bugs, but writing code like that is a sin anyways and if I ever see something like that in production, I will strangle the person responsible myself. I hate interview tests that ask for useless trivia instead of actually testing ability.
tofucake
Profile Blog Joined October 2009
Hyrule19193 Posts
March 08 2016 13:30 GMT
#14144
Yeah these are dumb questions :\
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
Last Edited: 2016-03-08 14:41:51
March 08 2016 14:40 GMT
#14145
On March 08 2016 21:57 Morfildur wrote:
Show nested quote +
On March 08 2016 21:45 Manit0u wrote:
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

+ Show Spoiler +

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I probably would have walked out. Those are terrible questions with no real world application. Well, #5 is sort of relevant since such algorithms can easily lead to bugs, but writing code like that is a sin anyways and if I ever see something like that in production, I will strangle the person responsible myself. I hate interview tests that ask for useless trivia instead of actually testing ability.


I thought more of it as "do you know the basics" like how pointers work, what's the default return value of a function, what's the difference between pre- and post- increment etc.

Still, was expecting something completely different since in their offer they stated that 2+ years of experience is a requirement. Came in expecting questions about hydration strategies, event listeners, RESTful service implementations and such. Instead I got this, had to construct a db query with some joins and iterate over DOM elements with jQuery. All very basic stuff.
Time is precious. Waste it wisely.
Cynry
Profile Blog Joined August 2010
810 Posts
March 08 2016 15:45 GMT
#14146
What's roughly your skillset Manit0u ?
I'm seeing a lot of job offers (small missions mostly) going by these days, usually web apps, so if you're into that..
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
Last Edited: 2016-03-08 16:49:15
March 08 2016 16:41 GMT
#14147
On March 09 2016 00:45 Cynry wrote:
What's roughly your skillset Manit0u ?
I'm seeing a lot of job offers (small missions mostly) going by these days, usually web apps, so if you're into that..


I'm primarily a PHP developer. Used to do a bit of front-end work but for the past 1+ years I've been doing mostly back-end stuff (so it would be advanced PHP and intermediate JavaScript for the most part for me, I also know my way around CSS and HTML but have been a bit out of touch with those lately). If you need help with some smaller projects I believe I could help out, especially that I have a lot more leeway now that I've started my own one-man company and am mostly employed on a b2b basis

I did take part in a multitude of projects. From simple webpage portfolios, Magento- and Sylius-based e-commerce to various ERP solutions (this past year I've been dealing almost exclusively in DMS, QMS, SaaS and the like).
Time is precious. Waste it wisely.
Itsmedudeman
Profile Blog Joined March 2011
United States19229 Posts
March 09 2016 04:18 GMT
#14148
So let's see if I can word my question properly, but when I'm sending data to something like a jsp page from a servlet should I be flattening out that data? For example, I have an object in java that I want to send over but rather than having the jsp page fetch its details through getters should I instead lay it out in a simplified json/xml format?
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
March 09 2016 13:29 GMT
#14149
Aren't jsp pages parsed by jvm anyway? It doesn't matter what form your data takes there. It's just a matter of displaying it to the user. You should use json and xml as return data from your services to external resources (unless you somehow need them in that format in your view).
Time is precious. Waste it wisely.
Chocolate
Profile Blog Joined December 2010
United States2350 Posts
March 11 2016 08:24 GMT
#14150
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
March 11 2016 09:16 GMT
#14151
On March 11 2016 17:24 Chocolate wrote:
Show nested quote +
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself


Usually such interview questions are the result of "clever" programmers that created a code base based on such quirks, and now they look for someone who understands their "clever" code.

Either way, PHP doesn't warn you about a lot of things, especially if you don't enable all the warning and strict flags, so it's easy for messy code to end up working by random chance. JavaScript might have a reputation as a terrible language - in my opinion unfounded -, but I much rather develop Node.js applications than PHP. PHP has too many quirks that just annoy me all the time.
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
March 11 2016 13:18 GMT
#14152
I don't think "strings are character arrays" qualifies as a quirk.
tofucake
Profile Blog Joined October 2009
Hyrule19193 Posts
March 11 2016 13:44 GMT
#14153
On March 11 2016 18:16 Morfildur wrote:
Show nested quote +
On March 11 2016 17:24 Chocolate wrote:
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself


Usually such interview questions are the result of "clever" programmers that created a code base based on such quirks, and now they look for someone who understands their "clever" code.

Either way, PHP doesn't warn you about a lot of things, especially if you don't enable all the warning and strict flags, so it's easy for messy code to end up working by random chance. JavaScript might have a reputation as a terrible language - in my opinion unfounded -, but I much rather develop Node.js applications than PHP. PHP has too many quirks that just annoy me all the time.

most of the quirks have been worked out of the language as of 7, and plenty of the remaining ones are going to be removed soon anyway.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
Last Edited: 2016-03-11 14:49:09
March 11 2016 14:28 GMT
#14154
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Well, it's all because most of the basic PHP functionality depends on the underlying C stuff (in which strings are character arrays). It's also why some of the functions behave differently on different platforms (and some of them simply don't work at all on Windows for example).

Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.

It's dumb, but it's there and some people even use those quirks to save a couple of lines of code here and there. It's really bad practice in my opinion and borders on code obfuscation.

As for me, I'm always trying to use Python's philosophy of explicit > implicit (including trying to avoid pre- and post- incrementation). Even if I often have to write more code because of that I'm usually glad I did when I come back to it after a couple of months.

On March 11 2016 22:44 tofucake wrote:
most of the quirks have been worked out of the language as of 7, and plenty of the remaining ones are going to be removed soon anyway.


I think there'll still be plenty of wrong with PHP until Zend won't change their philosophy of "PHP is not for programmers" and finally decide to:
1. unify function names (2 vs to etc.)
2. reduce the number of built-in functions (there's too much, and plenty of useless stuff. I mean, just check this out)
3. enforce writing secure and stable apps (removing eval, getting rid of php config files etc.)
4. unify function argument sequence (they swap it around for seemingly very similar functions, I can never remember all the search function's needle and haystack arguments order).
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19193 Posts
March 11 2016 14:42 GMT
#14155
There's a bunch of RFCs now about unifying function arguments. One I'm especially happy about is to allow negative offsets in all the string functions.
Liquipediaasante sana squash banana
Cyx.
Profile Joined November 2010
Canada806 Posts
March 11 2016 16:13 GMT
#14156
On March 11 2016 23:28 Manit0u wrote:
Show nested quote +
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
March 11 2016 17:50 GMT
#14157
On March 12 2016 01:13 Cyx. wrote:
Show nested quote +
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
March 11 2016 18:04 GMT
#14158
On March 12 2016 02:50 Manit0u wrote:
Show nested quote +
On March 12 2016 01:13 Cyx. wrote:
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.


Treating strings as string arrays is fun:

<?
$x = "abcd";
echo $x[0][0][0][0][0][0][0][0][0][0][0]; // a
Manit0u
Profile Blog Joined August 2004
Poland17679 Posts
March 11 2016 18:07 GMT
#14159
On March 12 2016 03:04 Morfildur wrote:
Show nested quote +
On March 12 2016 02:50 Manit0u wrote:
On March 12 2016 01:13 Cyx. wrote:
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.


Treating strings as string arrays is fun:

<?
$x = "abcd";
echo $x[0][0][0][0][0][0][0][0][0][0][0]; // a


What?! I don't even...
Time is precious. Waste it wisely.
madnessman
Profile Blog Joined May 2009
United States1581 Posts
March 11 2016 18:17 GMT
#14160
Has anybody had any success here writing an SC:BW AI which doesn't just execute a few hard coded strategies? I've finished my courses in AI and machine learning and I'm thinking about writing a BW AI to compete in the CIG AI competition this year. I found a few papers where researchers tried to implement more sophisticated methods but those bots didn't fare too well against the other competitive bots.
Prev 1 706 707 708 709 710 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 7h 33m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 186
UpATreeSC 85
StarCraft: Brood War
Sea 5982
GuemChi 1354
Artosis 800
Shuttle 285
Moletrap 10
Dota 2
monkeys_forever427
League of Legends
JimRising 650
goblin17
Counter-Strike
Fnx 1859
taco 643
Super Smash Bros
hungrybox2494
Heroes of the Storm
Khaldor225
Other Games
summit1g11764
C9.Mang0266
Maynarde186
JuggernautJason21
Organizations
Other Games
gamesdonequick1203
Counter-Strike
PGL147
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Hupsaiya 201
• davetesta20
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 24
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21762
League of Legends
• Doublelift3966
Upcoming Events
Replay Cast
7h 33m
Wardi Open
10h 33m
Monday Night Weeklies
15h 33m
Replay Cast
22h 33m
Replay Cast
2 days
Replay Cast
2 days
The PondCast
3 days
KCM Race Survival
3 days
Replay Cast
3 days
Ultimate Battle
4 days
Light vs ZerO
[ Show More ]
Replay Cast
4 days
CranKy Ducklings
5 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS5
PiG Sty Festival 7.0
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
Nations Cup 2026
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025

Upcoming

ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
NationLESS Cup
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
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.