• 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 406

Forum Index > General Forum
Post a Reply
Prev 1 404 405 406 407 408 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.
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
December 04 2013 22:45 GMT
#8101
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.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
bangsholt
Profile Joined June 2011
Denmark138 Posts
Last Edited: 2013-12-06 01:32:20
December 06 2013 01:27 GMT
#8102
On December 05 2013 07:45 sluggaslamoo wrote:
Show nested quote +
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.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
Last Edited: 2013-12-06 02:22:45
December 06 2013 02:22 GMT
#8103
One of my courses had a big semester long project creating an app(mostly focused on the documentation, we had to create it at the end). I spent probably 15 to 20 hours on my part(the entire front end and logic for it, etc.), and a lot of frustration, over 1.5 weeks or so before the deadline. Was polishing it up 2 days before it was due. One of the other guys spent even more time than me(doing the database, etc.) and finished around the same time as me.

The connection between our app and the server was left to a third guy in our group. We tried to talk to him over FB leading up to this due date for 1.5 weeks and hardly got any replies. With 2 days to go we organized a meeting at 10:30. He showed up at 1:30. He had a bit of connection working("Don't worry guys, once I get this it's smooth sailing!"). The day before we had a meeting at 10:30 again. He showed up at 2:30 because he slept in. Still had a bit of connection working. Same line. The Database guy spent the rest of the day trying to get his own version of the connection working. I stayed with them to help out. Left at 1130, got back at 1200, had to spend 1.5 hours documenting my stuff. Went to sleep at 130. Woke up at 7 to head to school to present. Guy who was supposed to do the connection was there, still trying to get it to connect. We head into the meeting. Guy starts copying down another group member's logbook(which says who was at meetings, etc.) that says he hasn't been at any meetings IN THE FUCKING PRESENTATION. He's also coding, trying to get the connection to work, still feeding us the same line. I present the front-end, DB guy present DB. Connection guy shows the non-functional code. We leave.

I get home, try to make it work for my own curiosity. Find a guide online, copy/paste the code. 25 minutes and I have a fully working asynchronous connection.

Fuck group projects.

/vent over. Steam has been released.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
December 06 2013 02:41 GMT
#8104
Can you guys suggest on how to practice TDD? I know how it works but I want to get into the 'habit' of it. It just feels awkward writing tests first.
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-12-06 03:17:17
December 06 2013 03:10 GMT
#8105
On December 06 2013 10:27 bangsholt wrote:
Show nested quote +
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
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-12-06 03:14:05
December 06 2013 03:13 GMT
#8106
On December 06 2013 11:41 icystorage wrote:
Can you guys suggest on how to practice TDD? I know how it works but I want to get into the 'habit' of it. It just feels awkward writing tests first.


Yep, even people who have been doing TDD for a long time still pretty much don't know what they are doing.

Knowledge is far more important than practice in this regard, you need to hit the books and find out as much as you can. There is a lot to know, its taken me several years before I feel like I can test as fluently as I can implement and I know exactly what I'm doing.

I don't really have the time to answer such a general question here, so if you have a more specific question or an example I am happy to answer that for you.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
December 06 2013 03:48 GMT
#8107
On December 06 2013 11:22 WarSame wrote:
One of my courses had a big semester long project creating an app(mostly focused on the documentation, we had to create it at the end). I spent probably 15 to 20 hours on my part(the entire front end and logic for it, etc.), and a lot of frustration, over 1.5 weeks or so before the deadline. Was polishing it up 2 days before it was due. One of the other guys spent even more time than me(doing the database, etc.) and finished around the same time as me.

The connection between our app and the server was left to a third guy in our group. We tried to talk to him over FB leading up to this due date for 1.5 weeks and hardly got any replies. With 2 days to go we organized a meeting at 10:30. He showed up at 1:30. He had a bit of connection working("Don't worry guys, once I get this it's smooth sailing!"). The day before we had a meeting at 10:30 again. He showed up at 2:30 because he slept in. Still had a bit of connection working. Same line. The Database guy spent the rest of the day trying to get his own version of the connection working. I stayed with them to help out. Left at 1130, got back at 1200, had to spend 1.5 hours documenting my stuff. Went to sleep at 130. Woke up at 7 to head to school to present. Guy who was supposed to do the connection was there, still trying to get it to connect. We head into the meeting. Guy starts copying down another group member's logbook(which says who was at meetings, etc.) that says he hasn't been at any meetings IN THE FUCKING PRESENTATION. He's also coding, trying to get the connection to work, still feeding us the same line. I present the front-end, DB guy present DB. Connection guy shows the non-functional code. We leave.

I get home, try to make it work for my own curiosity. Find a guide online, copy/paste the code. 25 minutes and I have a fully working asynchronous connection.

Fuck group projects.

/vent over. Steam has been released.

[image loading]
Liquipediaasante sana squash banana
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 06 2013 04:20 GMT
#8108
First week thrown on iOS project. iOS development is pretty fun.
There is no one like you in the universe.
Die4Ever
Profile Joined August 2010
United States17718 Posts
December 06 2013 09:10 GMT
#8109
reminder I have source code for the WCS Predictor 2014 online http://www.teamliquid.net/forum/viewmessage.php?topic_id=436957

don't let some graphics guy beat out the programmer who made the Blizzcon Predictor and is working on the WCS Predictor 2014
please vote for me, Die4Ever, in Group P
http://www.teamliquid.net/forum/viewmessage.php?topic_id=436997
"Expert" mods4ever.com
njt7
Profile Joined August 2012
Sweden769 Posts
December 06 2013 11:53 GMT
#8110
Yeah I hated objective-c when I first started out with it, I came from c++/c# so it was almost all similar except weird. But after a while it doesnt really matter and further down the road it was very enjoyable to work with. I especially liked to work in Xcode when I learned the platform. Everything new can be frustrating in the beginning, just take some time to learn your environment and all the smart stuff it has to offer you. Dont dwell on what you dont have and rejoice over what you get etc.
"All the casters who flamed me ever for anything."
bangsholt
Profile Joined June 2011
Denmark138 Posts
December 06 2013 13:05 GMT
#8111
On December 06 2013 12:10 sluggaslamoo wrote:
Show nested quote +
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
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2013-12-06 16:56:07
December 06 2013 16:55 GMT
#8112
On December 06 2013 22:05 bangsholt wrote:
Show nested quote +
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


There are different kind of tests:

On one hand there are unit tests, which are meant to be fast and small in scope, though running all of them can also take a lot of time, and on the other are integration tests, which can take up more time and test that the complete system still works since a system can still be broken even if it's 100% unit tested. There are also acceptance tests, but those are a completely different topic.

The reason for unit and integration testing during CI is that, while each developer might unit test the things he works on, it might happen that developers working on different parts of the code cause changes that unintentionally cause the code of the other developer to suddenly not work properly since he relied on certain behavior that got changed (yes, in a perfect world this doesn't happen. However, it does happen.)
Different developers usually work on different branches, so your unit tests only catch the bugs you create in your own code and unless you constantly integrate, i.e. merge, all the other branches people work on, you won't catch those problems.

With automated testing before deployment you make sure that such unintended side effects are caught as soon as possible.
phar
Profile Joined August 2011
United States1080 Posts
December 07 2013 04:33 GMT
#8113
^ This is exactly the reason.

On December 06 2013 22:05 bangsholt wrote:
Show nested quote +
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

This sort of setup becomes especially important when you have larger codebases with more engineers submitting code.

Presubmit testing is good, you should always do that. But presubmit testing will not always help you catch the exact change that caused a bug if you have thousands engineers touching all levels of your dependencies. Say between point X and point Y your test started failing. That's easy to find out if you are working independently, but if you have 5 people it becomes harder. If there's like 20,000 changes between point X and point Y, it gets really fucking annoying to find breaks by hand.

To your specific technology question, yes I used Jenkins, it works for smaller projects. Jenkins would fail horribly in my current workplace due to scale, but it might be just fine for you. We also can't use a lot of other fun things, like git, so don't be dissuaded.
Who after all is today speaking about the destruction of the Armenians?
Release
Profile Blog Joined October 2010
United States4397 Posts
Last Edited: 2013-12-07 05:47:16
December 07 2013 05:07 GMT
#8114
Edit: damn my code was bad. I will be back...
☺
Ben...
Profile Joined January 2011
Canada3485 Posts
December 07 2013 05:15 GMT
#8115
On December 06 2013 11:41 icystorage wrote:
Can you guys suggest on how to practice TDD? I know how it works but I want to get into the 'habit' of it. It just feels awkward writing tests first.

We were required to use it for all assignments for one of my classes this year so I have used it a fair amount. I still couldn't tell you how to use it effectively outside of the concepts I'm sure you already know. It's an abstract concept because in a way you are working backwards. I find it's kinda hard to define how to use TDD for a given project without having any specific requirements. For us the requirements were that we had to write unit tests (plus other specified tests like stuff to check for boundary issues, how the program handles incorrect or no input, stuff like that) first using assertions, and then write the code such that the minimal amount of code was necessary to pass the tests. Standard stuff. I know a lot of people didn't do it even though it was specified because half way through he started requiring Subversion logs of all revisions to show that we were first writing tests. I use it for everything other than GUI stuff now but I still have trouble explaining how to do it to others. I do think habit is a good way to define it.

Once you get used to writing tests first it isn't that big of a deal to do so. It may seem weird because you are deliberately breaking your program by causing assertions to fail but since you are ideally supposed to make a working program, having to go through the tests to get it to work forces you to understand the problem you are trying to solve more rather than just test as you go like most novice programmers do. One thing I do think is that TDD makes you slow down and lets you focus way more, and that is why I like it. Instead of having to worry about this grand picture of what the final product will look like you just have to worry about making code that will pass the first test in your list of tests. It's a more methodical way of doing things.
"Cliiiiiiiiiiiiiiiiide" -Tastosis
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-12-07 14:03:43
December 07 2013 13:58 GMT
#8116
On December 06 2013 22:05 bangsholt wrote:
Show nested quote +
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
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
klo8
Profile Joined August 2010
Austria1960 Posts
Last Edited: 2013-12-07 15:16:08
December 07 2013 15:13 GMT
#8117
Just started learning Clojure and Emacs. Hoo boy, that's a lot of googling, but it's really fun. I tried learning Common Lisp a few years ago but it didn't stick with me, I thought the syntax was arcane and weird (car, cdr, cddr, what?) and back then I had no idea about FP, so it was doubly difficult. Now that I have a few months of experience with FP in the form of Scala, that part is a lot easier for me. Clojure also feels a lot more modern than Common Lisp, to me at least. With Emacs, it's really cool to have a REPL for your current project running in the same window as the editor. Currently toying around with quil (Clojure bindings for Processing) and trying to port my L-System parser to Clojure. This is the Emacs configuration I've been using, works pretty well. I really like that it can display documentation for a highlighted function inside the editor.
This post is clearly not a hurr, as you can see from the graph, the durr never intersects with the derp.
MichaelEU
Profile Joined February 2011
Netherlands816 Posts
December 07 2013 16:49 GMT
#8118
Whenever I think of TDD, I think of this story from The Codeless Code.

I do feel like becoming better at TDD comes with simply doing it a lot. The methodology itself does wonders.
世界を革命する力を!― znf: "Michael-oniichan ( *^▽^*)ノ✩キラ✩"
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-12-08 07:25:38
December 08 2013 07:23 GMT
#8119
On December 08 2013 01:49 MichaelEU wrote:
Whenever I think of TDD, I think of this story from The Codeless Code.

I do feel like becoming better at TDD comes with simply doing it a lot. The methodology itself does wonders.


The issue with TDD is there just isn't much information out there on how to do it, and googling it won't help you much. You can spend years doing TDD without doing it right, its all about research.

For example there is a specific way to do unit/specification tests in order to make it easier maintain and genuinely cover your code. Knowing this method makes the process a lot less confusing.

Lets give the example of a Sum method for a Math class in RSpec. A lot of people will do something like this,


describe Math do
it 'should add numbers together' do
Math.new.sum(1,2).should == 3
end
end


There are several problems with this kind of approach,
- It makes it hard to figure out what to implement
- You don't understand what you are really testing for
- The subject is not clear
- The expectation is not clear
- Nothing is reusable
- It doesn't address code coverage

A much better way to do it is this way


describe Math do

subject { Math.new }

describe '#sum' do
context 'when first argument is 1 and second argument is 2' do
its('sum(1,2)') { should == 3 }
end
end

end


It may look more verbose at first but once you have big test files this allows you to be much more organised. If you could imagine a bunch of tests looking like the first example, it would cause massive headaches adjusting the test code whenever you changed the implementation.

Why the second version is better,

- People know exactly where to look in order to change the test if the #sum method ever got changed.
- The context and expectation is crystal clear
- The code coverage is clear, if there was any additional implementation you know its not covered already
- Most importantly, the test describes clearly how to get it to pass

The last point being a fundamental point, in that a lot of the reasons people struggle with TDD is not because they have to test-first, its because the tests don't make a whole lot of sense in the first place.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
ambikalx
Profile Joined September 2011
United States30 Posts
December 08 2013 09:05 GMT
#8120
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!
Prev 1 404 405 406 407 408 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.