• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:56
CET 07:56
KST 15:56
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion FlaSh's Valkyrie Copium BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1198 users

The Big Programming Thread - Page 407

Forum Index > General Forum
Post a Reply
Prev 1 405 406 407 408 409 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.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-12-08 09:29:34
December 08 2013 09:29 GMT
#8121
On December 08 2013 18:05 ambikalx wrote:
Hey guys! It's been a while since I've hit this thread up. This is a web dev question this time! I have been learning PHP/jQuery with MySQL and I'm interested in creating an online travel agency kind of site that searched to see which tour guides were available on user selected dates. I'm looking for advice on what may be the best way to store the calendars/availability of all of the guides. My current idea is to only store reserved dates in the guide's table and reference another table which contains rules set by the guide (not available on weekends, prices are $x on these days, etc.). Can anyone see any pitfalls of doing it this way? Does anyone know of a better way I could go about doing this?

Thanks for your help!

Good database design theory is to make tables scalable and to be as specific as possible.

Databases can have constraints set on them if you want. But having an administrative table for things that can change is a good idea.

I learned a lot from here:
https://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/


I don't think it's a good idea to only use two tables for this.

And making calendars is difficult imo. There are many intricacies to dates that are hard to program and php isn't the best language to work with dates.
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.
bangsholt
Profile Joined June 2011
Denmark138 Posts
December 08 2013 11:46 GMT
#8122
On December 07 2013 22:58 sluggaslamoo wrote:
Show nested quote +
On December 06 2013 22:05 bangsholt wrote:
On December 06 2013 12:10 sluggaslamoo wrote:
On December 06 2013 10:27 bangsholt wrote:
On December 05 2013 07:45 sluggaslamoo wrote:
On December 05 2013 00:30 darkness wrote:
Does anyone here like Objective-C? I'm starting to hate it with a passion by now. I find Java's syntax and way much better and easier.


It has some nice features, it was great for its time but I'm sure if it wasn't for apple it would be long dead by now.


Thanks for your opinion and all the great argumentation you have present on the subject of why you are starting to hate it with a passion.

I'm currently playing around with a great mix of Jenkins, Stash and JIRA, in order to make it build automagically and run a few simple static code analysis and unit testing on my code.

People out there who have actual experience with how well this works in a work scenario - I'm thinking it will work great, because it will enable us to put out a lot of metrics, which then can be measured and possibly drawn conclusions on, if someone feels that brave, but I would like to hear from people who have a similar setup as well.

Thanks in advance for your time.


What is it you want to know? Continuous Integration and Testing is one of the reasons I actually get hired haha

I mean yeah I've used Jenkins a lot, JIRA I don't really like but then again I don't really like any kind of digital scrum/agile software and prefer to use real cards, I don't have experience with Stash specifically but Atlassian software seems to be very good in general from using Bamboo.

It will be a long time before I move away from Github though if ever


I've read the idea with CI is that you make a new build every time you commit to the Git server on the master branch.

What I don't really understand is the part where testing comes into the picture, one would assume you run all the tests prior to commit the code, and each commit should be atomic.

Or is it a case of you over time accumulate some tests that take a lot of time to run and you don't want to run each time that you compile?

It's this sort of questions I wonder a bit about - again, thanks for your time


You are pretty much on the ball there, both of those statements are true. Ideally you would want to do a "full build" before pushing to your branch, but in large projects where it takes an hour to do that it is not possible.

So on your local machine you may just be content with core scenario tests, integration tests and unit tests, and then CI handles the bigger picture. Then you have a "build light" that checks CI periodically, and will alarm everybody if someone broke the build and blame them for it

When this happens, everyone should stop committing until the bug is fixed.

Show nested quote +
I've read the idea with CI is that you make a new build every time you commit to the Git server on the master branch.


Got a bit confused by the "make a new build every time", do you mean run the build?

If so yes, normally you have nightly builds, source control event-based and on-demand builds for each type of test, and for each branch. Your event based builds would trigger when your git repository receives an update.

Normally you wouldn't want to be pushing to master, you want to be merging into it from your version branch. There should be a protocol to only merge into master after a "full build" which is basically every single test which sometimes can take hours.

It may look something like this

Master-Nightly-FullBuild
Master-Nightly-Load-Test
Version1.1-Nightly-FullBuild
Version1.1-Unit-Tests
Version1.1-Integration-Tests
Version1.1-Scenario-Tests-Minor
Version1.1-Scenario-Tests-All
Version1.1-E2E-Tests
Version1.1-Load-Test


Yes, I meant run the build

I got a better idea of the whys now, thanks for that to you, phar and Morfildur
ambikalx
Profile Joined September 2011
United States30 Posts
December 08 2013 23:14 GMT
#8123
On December 08 2013 18:29 obesechicken13 wrote:
Good database design theory is to make tables scalable and to be as specific as possible.

Databases can have constraints set on them if you want. But having an administrative table for things that can change is a good idea.

I learned a lot from here:
https://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/


I don't think it's a good idea to only use two tables for this.

And making calendars is difficult imo. There are many intricacies to dates that are hard to program and php isn't the best language to work with dates.


Thanks for the response! That link was just what I needed. I had been absolutely in the dark as far as how to structure my databases/tables. I read up on the entity-relationship model and have a much better idea of what I'm doing now.

Also, I totally forgot that I am actually going to be taking Database Design & Development next semester in my CS major *slaps forehead*. We will be learning about ERM, so I guess I'm going to have a bit of a head start on the class
phar
Profile Joined August 2011
United States1080 Posts
December 09 2013 00:17 GMT
#8124
On December 08 2013 20:46 bangsholt wrote:
Show nested quote +
On December 07 2013 22:58 sluggaslamoo wrote:
On December 06 2013 22:05 bangsholt wrote:
On December 06 2013 12:10 sluggaslamoo wrote:
On December 06 2013 10:27 bangsholt wrote:
On December 05 2013 07:45 sluggaslamoo wrote:
On December 05 2013 00:30 darkness wrote:
Does anyone here like Objective-C? I'm starting to hate it with a passion by now. I find Java's syntax and way much better and easier.


It has some nice features, it was great for its time but I'm sure if it wasn't for apple it would be long dead by now.


Thanks for your opinion and all the great argumentation you have present on the subject of why you are starting to hate it with a passion.

I'm currently playing around with a great mix of Jenkins, Stash and JIRA, in order to make it build automagically and run a few simple static code analysis and unit testing on my code.

People out there who have actual experience with how well this works in a work scenario - I'm thinking it will work great, because it will enable us to put out a lot of metrics, which then can be measured and possibly drawn conclusions on, if someone feels that brave, but I would like to hear from people who have a similar setup as well.

Thanks in advance for your time.


What is it you want to know? Continuous Integration and Testing is one of the reasons I actually get hired haha

I mean yeah I've used Jenkins a lot, JIRA I don't really like but then again I don't really like any kind of digital scrum/agile software and prefer to use real cards, I don't have experience with Stash specifically but Atlassian software seems to be very good in general from using Bamboo.

It will be a long time before I move away from Github though if ever


I've read the idea with CI is that you make a new build every time you commit to the Git server on the master branch.

What I don't really understand is the part where testing comes into the picture, one would assume you run all the tests prior to commit the code, and each commit should be atomic.

Or is it a case of you over time accumulate some tests that take a lot of time to run and you don't want to run each time that you compile?

It's this sort of questions I wonder a bit about - again, thanks for your time


You are pretty much on the ball there, both of those statements are true. Ideally you would want to do a "full build" before pushing to your branch, but in large projects where it takes an hour to do that it is not possible.

So on your local machine you may just be content with core scenario tests, integration tests and unit tests, and then CI handles the bigger picture. Then you have a "build light" that checks CI periodically, and will alarm everybody if someone broke the build and blame them for it

When this happens, everyone should stop committing until the bug is fixed.

I've read the idea with CI is that you make a new build every time you commit to the Git server on the master branch.


Got a bit confused by the "make a new build every time", do you mean run the build?

If so yes, normally you have nightly builds, source control event-based and on-demand builds for each type of test, and for each branch. Your event based builds would trigger when your git repository receives an update.

Normally you wouldn't want to be pushing to master, you want to be merging into it from your version branch. There should be a protocol to only merge into master after a "full build" which is basically every single test which sometimes can take hours.

It may look something like this

Master-Nightly-FullBuild
Master-Nightly-Load-Test
Version1.1-Nightly-FullBuild
Version1.1-Unit-Tests
Version1.1-Integration-Tests
Version1.1-Scenario-Tests-Minor
Version1.1-Scenario-Tests-All
Version1.1-E2E-Tests
Version1.1-Load-Test


Yes, I meant run the build

I got a better idea of the whys now, thanks for that to you, phar and Morfildur

NP. And if you do get pushback from people at your work who are dragging their feet about setting up proper building and testing, you should be able to explain how much time you'll save in the long run if you invest up front.
Who after all is today speaking about the destruction of the Armenians?
misirlou
Profile Joined June 2010
Portugal3241 Posts
December 09 2013 00:37 GMT
#8125
Anyone have experience developing/contributing for Open Stack? My master's is to make a scheduler for it, so any info I could get on working for it and getting started with some community interaction would be appreciated
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
December 09 2013 02:28 GMT
#8126
On December 09 2013 08:14 ambikalx wrote:
Show nested quote +
On December 08 2013 18:29 obesechicken13 wrote:
Good database design theory is to make tables scalable and to be as specific as possible.

Databases can have constraints set on them if you want. But having an administrative table for things that can change is a good idea.

I learned a lot from here:
https://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/


I don't think it's a good idea to only use two tables for this.

And making calendars is difficult imo. There are many intricacies to dates that are hard to program and php isn't the best language to work with dates.


Thanks for the response! That link was just what I needed. I had been absolutely in the dark as far as how to structure my databases/tables. I read up on the entity-relationship model and have a much better idea of what I'm doing now.

Also, I totally forgot that I am actually going to be taking Database Design & Development next semester in my CS major *slaps forehead*. We will be learning about ERM, so I guess I'm going to have a bit of a head start on the class

No problem. I took an intro to databases course this semester and I thought that link helped me a lot to understand entity relationship design.
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.
jWavA
Profile Joined January 2011
United States73 Posts
December 09 2013 04:38 GMT
#8127
I've got my first ever technical interview tomorrow, with Google for their Eng. Practicum Internship. Any advice?
Kambing
Profile Joined May 2010
United States1176 Posts
December 09 2013 07:47 GMT
#8128
On December 09 2013 13:38 jWavA wrote:
I've got my first ever technical interview tomorrow, with Google for their Eng. Practicum Internship. Any advice?


Talk. Specifically, when you work through problems, vocalize your thought process to the best of your ability. Interview questions are meant to expose how you think, and you won't be able to show that off without saying something.
epok
Profile Joined September 2013
United States117 Posts
December 09 2013 17:34 GMT
#8129
Don't lie to your interviewer!
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2013-12-10 02:31:44
December 10 2013 02:30 GMT
#8130
^ These are very good tips. Always think out loud, that way the interviewer can write effective feedback on what you're thinking. Never lie, because interviewers can tell

If you take only one thing from TL on interview tips, let it be what Kambing said above. THINK OUTLOUD. Even if you're stuck, keep describing why you're stuck, where you're drawing blanks, what you know and what you think you don't know. It's really weird to get used to at first, but it is a necessary thing for technical interviews.

On December 09 2013 13:38 jWavA wrote:
I've got my first ever technical interview tomorrow, with Google for their Eng. Practicum Internship. Any advice?


Specifically on the EP part, realize that the interviewers should know that you have less experience than a normal interview candidate. If you don't know something, that's fine, just be up front about it so you don't work yourself into a hole. I hosted a couple of EP interns this summer, and they were definitely very green about software development coming in. That's ok, and your interview should be calibrated to take that into account.

It may be a bit rough if this is really your first technical interview, it can take awhile to get used to.


And then one of the local Googlers up here has a... rant, we'll say, on google interview process. It's mostly geared towards fulltime SWE, not EP, but a lot of it will apply. The middle sections on algorithms, data structures, practice, Big-O, it's all pretty good. I can't remember if EP are explicitly supposed to know about complexity theory, so if there's some stuff on there that you don't recognize, it may not apply for you. Also your recruiter may have given you more detail about what you're expected to know.

http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html

Even if you don't get in, don't be discouraged, apply again next year, and apply to many places. You'd be a freshman or sophomore right now if you're applying for EP, so you have time still


good luck~
Who after all is today speaking about the destruction of the Armenians?
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-12-11 04:26:15
December 11 2013 04:22 GMT
#8131
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.
Kambing
Profile Joined May 2010
United States1176 Posts
December 11 2013 04:35 GMT
#8132
On December 11 2013 13:22 darkness wrote:
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.


You allude to it in your problem description, but the way to think about error-handling is asking yourself the question "is this a user-facing or internal API"? Users are considered untrustworthy and if there is a way to break or otherwise exploit your system, they will do it. In contrast, you trust yourself to do the "right thing" because you have control over how you use the system.

Regardless of the answer to this question, these sorts of pre-conditions you impose on your functions (resp. programs) should be documented in some form, e.g., in a comment. They are part of the interface to those functions and must be respected for your functions to perform as expected.

Whether you introduce more safe guards other than documentation depends on your answer to the question above. In the case of internal APIs, it is fine to not include any explicit checks. Some languages such as Java allow for assertions to be expressed that fit this mold. The statement assert e; evaluates the boolean expression e and raises an error if e is false. These asserts can be toggled on (for debugging) and off (for deployment) via flags to the compiler.

For user-facing APIs, it is a matter of good style to either "engineer" out these corner cases or otherwise provide internal checking to ensure that the inputs to the functions meet the functions' pre-conditions. If-statements are appropriate for this purpose. Try-catch blocks are typically reserved for exceptional cases that might occur during the execution of a function, e.g., a network socket getting yanked while you are reading in packets. They are not appropriate for merely checking these sorts of pre-conditions.

Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2013-12-11 07:20:08
December 11 2013 07:17 GMT
#8133
--- Nuked ---
windzor
Profile Joined October 2010
Denmark1013 Posts
Last Edited: 2013-12-11 09:15:05
December 11 2013 09:13 GMT
#8134
On December 11 2013 13:22 darkness wrote:
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.


If you need to check parameter values for which you have set up preconditions but dont check for them in the code you should use asserts. It will be easy to read from your code what boundaries you expect the function to work in without the user having the hassle with errors which might not be errors.

How much you want to do it is a cost/benefit of how many errors you will catch from yourself vs how long you use on writing them.
Yeah
billy5000
Profile Blog Joined December 2010
United States865 Posts
December 11 2013 18:57 GMT
#8135
I have a question about databases. I took a dbms course last semester, and we specifically used psql. At the same time I was taking a mongodb course online as well. One thing that caught my attention was how easy it is to scale mongodb due to its flexibility, but this brings up a question: How do relational databases scale? It seems like you have to know all the details, such as the relationships between tables, before the application is built. And adding any extra features may denormalize the relationships you had before and just complicate things further (sorry, I haven't built anything big yet, so I don't have any concrete examples).
Tiger got to hunt, bird got to fly; Man got to sit and wonder, 'Why, why, why?' Tiger got to sleep, bird got to land; Man got to tell himself he understand. Vonnegut
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
December 11 2013 20:35 GMT
#8136
On December 11 2013 18:13 windzor wrote:
Show nested quote +
On December 11 2013 13:22 darkness wrote:
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.


If you need to check parameter values for which you have set up preconditions but dont check for them in the code you should use asserts. It will be easy to read from your code what boundaries you expect the function to work in without the user having the hassle with errors which might not be errors.

How much you want to do it is a cost/benefit of how many errors you will catch from yourself vs how long you use on writing them.


Aren't asserts only for testing/debugging? I've searched for that on google, and I didn't find very positive suggestions to keep asserts in code for long.
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
December 11 2013 21:08 GMT
#8137
Asserts in deployment are a pain in the ass.
Liquipediaasante sana squash banana
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
December 11 2013 21:24 GMT
#8138
On December 11 2013 13:22 darkness wrote:
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.


For me there is one golden rule for error checking in programming:
In every userbase, no matter how big or small, there is at least one user that will manage to get the system into an invalid state. If you are the only user of the system (or method), it will eventually be you.

That means, even if you think you know that you always pass the right parameters into a function, eventually you will mix something up or forget the boundary conditions. That is why i check every parameter to every function (It's really not that much in a strongly typed language like java) because i know that eventually i will screw up. Noone remembers how the code he wrote 6 month ago really works in detail. There are some minor exceptions, for example in private methods i'm less strict about checking, though i still do check most of the input.

Then again, i'm really, really paranoid.
Kambing
Profile Joined May 2010
United States1176 Posts
December 11 2013 22:49 GMT
#8139
On December 12 2013 05:35 darkness wrote:
Show nested quote +
On December 11 2013 18:13 windzor wrote:
On December 11 2013 13:22 darkness wrote:
Say a user cannot cause a crash, but a programmer may pass some parameter that is out of boundaries. Is it good in this case to have all methods contain some boundary check (even if the programmer is the only person able to cause it) or is such check unnecessary?

Sub-question to the above one. What is preferred assuming both are available: if statement or try/catch blocks? When to go one over another?

I'm curious what to do for my individual university project. I'd like to do my best with the knowledge I have at the moment.

I use Java if it matters.


If you need to check parameter values for which you have set up preconditions but dont check for them in the code you should use asserts. It will be easy to read from your code what boundaries you expect the function to work in without the user having the hassle with errors which might not be errors.

How much you want to do it is a cost/benefit of how many errors you will catch from yourself vs how long you use on writing them.


Aren't asserts only for testing/debugging? I've searched for that on google, and I didn't find very positive suggestions to keep asserts in code for long.


Asserts are meant to capture pre-conditions/invariants in your code that are not explicitly checked. They are precisely the set of properties about your code that are "assumptions" that you assume will hold but trust the user of that code to get right. For example:

"The argument to factorial should be non-negative."
"Your helper function expects a non-null object."
"Your file processing function expects a file handled that has been opened but not yet closed."

In particular, the Java assert statement lets you express these in code versus in comments and gives you mechanism to have them checked (morally, when debugging) or not checked (morally, when deploying) as needed.
Kambing
Profile Joined May 2010
United States1176 Posts
December 12 2013 01:29 GMT
#8140
FYI, this week is Computer Science Education week!

http://csedweek.org/

This year, the code.org are pushing a nationwide movement for everyone to spend an hour of their time this week to learn how to code or teach a friend or family member how to code. Check out:

http://csedweek.org/learn

For tutorials for virtually all ages for a variety of technologies, with and without computers!
Prev 1 405 406 407 408 409 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 5h 4m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 156
SteadfastSC 147
SortOf 113
ProTech109
trigger 49
StarCraft: Brood War
actioN 484
PianO 169
Noble 45
NotJumperer 16
Icarus 5
Dota 2
XaKoH 351
League of Legends
JimRising 655
C9.Mang0344
Other Games
summit1g14517
WinterStarcraft555
Organizations
Other Games
gamesdonequick816
StarCraft: Brood War
UltimateBattle 65
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH178
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1106
• Stunt406
Upcoming Events
Wardi Open
5h 4m
StarCraft2.fi
10h 4m
Replay Cast
17h 4m
The PondCast
1d 3h
OSC
1d 9h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 17h
Korean StarCraft League
2 days
CranKy Ducklings
3 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
4 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
5 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
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.