• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:32
CEST 18:32
KST 01:32
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Weekly Cups (June 30 - July 6): Classic Doubles2[BSL20] Non-Korean Championship 4x BSL + 4x China8Flash Announces Hiatus From ASL66Weekly Cups (June 23-29): Reynor in world title form?14FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
The SCII GOAT: A statistical Evaluation The GOAT ranking of GOAT rankings Weekly Cups (June 23-29): Reynor in world title form? Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
Flash Announces Hiatus From ASL SC uni coach streams logging into betting site BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps
Tourneys
[BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational [BSL20] Non-Korean Championship 4x BSL + 4x China The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024! Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 637 users

The Big Programming Thread - Page 769

Forum Index > General Forum
Post a Reply
Prev 1 767 768 769 770 771 1031 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.
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
September 27 2016 23:36 GMT
#15361
On September 28 2016 02:36 Silvanel wrote:
Show nested quote +
On September 28 2016 01:08 maybenexttime wrote:
On September 28 2016 00:47 Silvanel wrote:
On September 27 2016 22:57 maybenexttime wrote:
Let me first introduce myself briefly. I am a mechanical engineering graduate who'd like to learn some Python and MATLAB programming, because I consider programming an important skill in every engineer's repertoire. For the past two months I have studied both languages and worked on some private projects of mine since that seems to be the best way to learn useful things.

.


Heh. Strange coincidence i am also mechanical engineer (material engineering to be precise) and Python also is my langauge of choice (and also Polish ). I cant help You with MATHLAB though, never had time to learn it properly. Will try to help with Python if i can though.

BTW Which Uni did You gradute from?


Strangely enough, I specialized in structural materials engineering.

I graduated from Wrocław University of Technology/Politechnika Wrocławska. And you? :-)


Technical University of Łódź


Poland strong
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2016-09-28 00:21:14
September 28 2016 00:09 GMT
#15362
ok, so, talking about java clone method

you have to

1.) implement the cloneable interface to say that the class is cloneable

then 2.) override the method:

protected Object clone() throws CloneNotSupportedException {

return super.clone();

}

and then 3.) object.clone(); //will return a shallow copy


but if I want to return a deep copy, what do I put in the clone method? maybe someone could give me an example where the extended class just has 1 member

I know that most advice seems to be "don't bother using the clone method for deep copies", but I think this may be asked on my exam anyways.




here is another question, this one is about testing coverage

"if you have 100% conditional coverage, do you automatically have 100% statement coverage".

I said no, because maybe you wrote methods and then don't use them? but maybe that's a silly answer. is there another reason why it could be no?

and

"If you have 100% conditional coverage, do you have 100% flow coverage"

I think flow coverage means that the tests cover all the possible paths of flow, like all the ways that conditions could play out? so the answer here would be definitely no because as a program get big flow coverage would become impossible to obtain.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-09-28 01:12:24
September 28 2016 00:43 GMT
#15363
--- Nuked ---
RoomOfMush
Profile Joined March 2015
1296 Posts
Last Edited: 2016-09-28 21:16:19
September 28 2016 08:04 GMT
#15364
On September 28 2016 09:09 travis wrote:
here is another question, this one is about testing coverage

"if you have 100% conditional coverage, do you automatically have 100% statement coverage".

I said no, because maybe you wrote methods and then don't use them? but maybe that's a silly answer. is there another reason why it could be no?

and

"If you have 100% conditional coverage, do you have 100% flow coverage"

I think flow coverage means that the tests cover all the possible paths of flow, like all the ways that conditions could play out? so the answer here would be definitely no because as a program get big flow coverage would become impossible to obtain.

100% conditional coverage implies 100% statement coverage. Dead code (as you mentioned) is usually ignored in testing since it can not be tested anyways.
However, 100% conditional coverage does not imply 100% flow coverage. This is because of loops. Conditional coverage only has to enter a loop 2 times at most, once where the loop condition is evaluated to true and once where it is evaluated to false. A 100% flow coverage would have to cover all possible iteration counts of all loops. Often times this is not even possible.

Here is some more explanation done by people who have more time on their hands than I:
http://programmers.stackexchange.com/questions/185869/is-path-coverage-stronger-than-condition-coverage

https://sites.google.com/site/swtestingconcepts/home/test-design-techniques/for-white-box/statement-branch-and-path-coverage
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2016-09-28 21:08:11
September 28 2016 21:07 GMT
#15365
Alright, the exam was tough but I think my studying paid off and I probably did pretty well. Many of the questions I knew because of what I had gotten clarified here, including the post directly above this one.

edit:

just realized I can't post exam questions online. Well anyways I think I probably got a high B or an A. The only question I know I missed was on using an interface in an anonymous class and it had the most confusing wording I have ever seen.
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
September 28 2016 22:06 GMT
#15366
Why cant you post exam questions online?
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
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
Last Edited: 2016-09-28 22:44:37
September 28 2016 22:44 GMT
#15367
So, we had like a dozen interns for the past month. Their job was to create an Android app integrating with one of our systems. Tomorrow is their last day and today me and one other friend got a first look at it (we'll be tasked with polishing it and fixing any bugs). Holy mother of all monsters...

Just to give you some idea of what's going on in there (I won't even mention utterly atrocious and inconsistent formatting):


class someclass(){ // yup lowercase almost everywhere
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();
Sth sth = new sth();

// lots of code. Obviously, sths aren't the same in their code but a different class
// each, wrote it like that so it was faster.
// They're not initializing classes when they need to but instead do it all in one go
// in a single god-class that controls everything
// (and almost all fields of all classes are public...)
}

public somemethod(String str){
somefield = str;
if (somefield == something) {
// do some stuff
}

return somefield ;
// obviously, somefield isn't used anywhere else
}

str.append('\r'); // why?! no one even uses macs in our company...

/**
* @param v
*/


I want to cry... To fix this we'll basically have to rewrite it from scratch.
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
September 28 2016 22:47 GMT
#15368
On September 29 2016 07:06 solidbebe wrote:
Why cant you post exam questions online?


school policy
probably in the case that other students go to that website and have yet to take the exam because of being sick or something

though our comp sci department is different from other departments in that you can't post it even after it's been graded and returned

actually last year we weren't even allowed to have our final exams back. maybe they reuse questions sometimes.
RoomOfMush
Profile Joined March 2015
1296 Posts
September 28 2016 22:59 GMT
#15369
On September 29 2016 07:47 travis wrote:
Show nested quote +
On September 29 2016 07:06 solidbebe wrote:
Why cant you post exam questions online?


school policy
probably in the case that other students go to that website and have yet to take the exam because of being sick or something

though our comp sci department is different from other departments in that you can't post it even after it's been graded and returned

actually last year we weren't even allowed to have our final exams back. maybe they reuse questions sometimes.

At our CS department we reuse questions all the time and yet we allow students to share their exams online. Did not do anything positive for their grades. The bad ones still fail. I believe that even if we printed out all the answers and handed them out 1 week in advance they would still manage to somehow fail the exam.

The main reason why we allow it is that its just too much of a hassle to fight it. Especially with all the new technology of today. Nobody is going to fight that losing battle.
Birdie
Profile Blog Joined August 2007
New Zealand4438 Posts
September 28 2016 23:18 GMT
#15370
My university provided every single exam online going back over a decade, pretty handy for revision.

@manitou ROFL I guess could only really be solved by investing a lot of time into oversight of the interns, which could be pretty expensive. But either way you have to invest time into either fixing it after the fact or fixing it while they code. It's a real shame that universities don't teach better coding practice, although they don't really have time and I guess the more "sciency" part of CS is more useful in the long run. I had to learn it all pretty much separately from university for the most part (not completely true), stuff like DRY and SRP and so on.
Red classic | A butterfly dreamed he was Zhuangzi | 4.5k, heading to 5k as support!
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2016-09-28 23:31:52
September 28 2016 23:28 GMT
#15371
something something universities are for research not to get you a job something something it's unfortunate society has made university education mandatory to join the workforce something something practical job related skills should be acquired elsewhere something something should not confuse using practical examples in courses to teach concepts as career training
There is no one like you in the universe.
RoomOfMush
Profile Joined March 2015
1296 Posts
Last Edited: 2016-09-29 00:28:34
September 29 2016 00:28 GMT
#15372
Yeah. We try to teach good coding practice at our university, but the practical course is just one class out of dozens that you will do over the course of your bachelor. And it only gives a tiny amount of credit points.

I always say: If you just want to learn coding there are professional schools for that. But your salary is tied to your academic achievements nowadays so everybody is flocking to the universities.
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
Last Edited: 2016-09-29 08:11:13
September 29 2016 01:01 GMT
#15373
Amazon can go fuck themselves. They're trying to automate the entire test process it seems (though they're trying a bunch of different things so I know people who have completely different formats and I have), and I think it sucks.

This particular round, I had to sign up for this shitty proctor system where another person watches you the entire time via your webcam and microphone. You need to be completely alone and give the proctor a complete view of the room and ensure there is nobody else close, which is hard when you don't have a room to yourself. Whatever. I sign up, go through all these authentication procedures, then start the test.

First part is a hilariously dumb "work simulation" where you literally answer (multiple-choice and rating different responses) answer IMs and emails about projects in a fake work environment. Utterly inane approximation of the workplace.

Not to mention that before this round they have this SAT-type useless high school logical test, where they do shit like "if aaaddlwpe --> MULTINATIONAL, then ppsdkdkfww --> ?" (just made up shit, but you get the drill), or "here's a set of hiring parameters, now here's a guy--should we hire/reject/refer him to manager", "mr brown owns a dog and walks on Fridays, Mr Pink has a Blue house, who drives the Chevy?" etc etc etc

Anyway after that work sim, I get into the coding questions which are on an entirely different platform called AMCAT, and questions are Java/C only despite them saying "we don't care about what language experience you have, we just want to see you can code!" in the multiple promotional workplace videos they force you to watch before the exam. You also aren't allowed to reference anything besides the Java/C docs (makes sense I suppose).

Well I get auto-kicked out of the system for pressing print screen even though my hand was never even close to the key. Turns out their stupid AMCAT system also needs user/pass credentials to get in normally, but their system for this test sends you straight from the work sim to the AMCAT fucktard system without creds, so I have no way of getting in.

Talked first to their contracted-out third-party support who have no clue about anything--they're just paid to sit and watch me for 3+ hours. Then I talk to the AMCAT supprot but they have no idea either and are incapable of communication besides rattling off FAQ shit, making me repeat myself for 30 minutes before finally telling me "ya we have no idea what to do".

Heard from an friend who interned there this summer that most teams are not really hiring new grads who didn't intern for them this hiring round anyway, and that they've been trying to get this system to work rather than have people come onsite. So I was probably always just a guinea pig and they never had much intention of hiring me, just wanted to test the system on some people.

Oh yeah and the entire time you have the proctor clown watching everything you do and make sure you show them the entire room whenever a millisecond of static or a fly fart is heard over the mic.

So I have wasted a nontrivial number of hours of my life interviewing for this garbage company while juggling other interviews, dealing with things in my life, school, what have you, and Amazon gets a free data point for their shitty system.

FUCK YOU AMAZON

/rant
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
September 29 2016 01:10 GMT
#15374
lol the proctor was just sitting there watching you try to troubleshoot these problems with their system?
that's hilarious
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
September 29 2016 01:20 GMT
#15375
So the proctor was through an external system called ProctorU which, it seems, usually is used by universities. So upon asking him if he could do anything, he told me "nah we're just hired to watch you do all this shit, talk to Amazon about that separate AMCAT system or whatever it's called". So I did, and turns out non-customer Amazon support is a trash can fire.
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2016-09-29 06:55:33
September 29 2016 06:54 GMT
#15376
Amazon most certainly does hire new grads who didn't intern with them. They also interview a *lot* of people on site.

But yea Amazon runs way too fast and loose with their hiring systems.

If you're in the area, Microsoft, Google, Facebook, Tableau, etc are all hiring...
Who after all is today speaking about the destruction of the Armenians?
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
Last Edited: 2016-09-29 07:26:32
September 29 2016 07:24 GMT
#15377
Ah gotcha. I don't know anybody here in California who got an offer and who went on-site, so maybe it's just on-sites for more senior SDEs and people who live in Washington, or I was just unlucky.
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2016-09-30 05:32:13
September 30 2016 05:31 GMT
#15378
It could easily be just unlucky. Does sound like this new system has... problems.

I would advocate shotgun approach and apply to many places (if you have the time).
Who after all is today speaking about the destruction of the Armenians?
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
September 30 2016 05:46 GMT
#15379
Yeah, normally I've applied to a ton of places for internships (100% agree that it's a numbers game). Now that I'm a soon-to-be new grad, though, I have a return offer from the company at which I interned this summer; I really like the offer so I've only been applying to really cool places where I'd be interested in working/prestigious places.
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
necrosexy
Profile Joined March 2011
451 Posts
Last Edited: 2016-09-30 06:33:50
September 30 2016 06:33 GMT
#15380
is David Flanagan's JavaScript: The Definitive Guide a good place to start for JS?

i feel i should start with pure JS instead of going straight to JQuery/AngularJS.
Prev 1 767 768 769 770 771 1031 Next
Please log in or register to reply.
Live Events Refresh
RotterdaM Event
16:00
Rotti Stream Rumble 4k Edition
RotterdaM443
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 762
RotterdaM 443
Hui .338
MaxPax 330
StarCraft: Brood War
Bisu 1963
EffOrt 1327
Flash 1236
Jaedong 1157
Hyuk 792
Stork 374
actioN 369
Soma 289
Soulkey 243
firebathero 173
[ Show more ]
Snow 171
Mind 99
JulyZerg 66
sSak 64
Barracks 60
TY 58
Sharp 48
Terrorterran 45
PianO 43
JYJ43
Rock 32
Yoon 24
HiyA 21
yabsab 17
Aegong 17
soO 16
GoRush 9
Shine 8
IntoTheRainbow 7
Dota 2
Gorgc6615
qojqva3321
League of Legends
singsing2243
Dendi1253
Counter-Strike
fl0m1160
markeloff169
Super Smash Bros
Mew2King257
Other Games
hiko1581
Beastyqt844
ceh9337
Lowko301
crisheroes248
ArmadaUGS149
KnowMe138
Trikslyr62
PGG 1
Organizations
Other Games
gamesdonequick47269
StarCraft 2
angryscii 21
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Reevou 6
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Michael_bg 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis6915
• Jankos912
• TFBlade845
Other Games
• Shiphtur333
Upcoming Events
Replay Cast
7h 28m
Sparkling Tuna Cup
17h 28m
WardiTV European League
23h 28m
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
1d 7h
The PondCast
1d 17h
WardiTV European League
1d 19h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
1d 23h
Replay Cast
2 days
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
Replay Cast
3 days
[ Show More ]
RSL Revival
3 days
Classic vs Cure
FEL
3 days
RSL Revival
4 days
FEL
4 days
FEL
4 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL20 Non-Korean Champi…
6 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.