• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:56
CET 14:56
KST 22: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
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!33$5,000+ WardiTV 2025 Championship6[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Sparkling Tuna Cup - Weekly Open Tournament Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BW General Discussion [BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review
Tourneys
[Megathread] Daily Proleagues [ASL20] Grand Finals [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1424 users

The Big Programming Thread - Page 750

Forum Index > General Forum
Post a Reply
Prev 1 748 749 750 751 752 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.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
August 05 2016 14:01 GMT
#14981
On August 05 2016 22:50 Manit0u wrote:
Show nested quote +
On August 05 2016 21:55 ShoCkeyy wrote:
Yes, if you say it's bad, then you're not using JavaScript correctly. While it does have its issues, it has come a long way. Never ever use it for math that's for damn sure.


Don't forget about Date, which isn't even consistent across browsers.


That's the main problem with JavaScript: Everyone is always looking at the browser implementations - which indeed are pretty terrible due to their inconsistency.
The language itself is actually quite nice and each iteration is getting nice new features. I actually prefer it to other scripting languages like PHP.
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
August 05 2016 14:41 GMT
#14982
do you guys know a way to make a mysql database smaller?

with smaller I don't mean to compress it, actually delete some portion of data without violating foreign keys. I have a db with say 100k hotels in it and I need just 4-5 to test my app. It can be 5 hotels in 3 countries with each country having 2 cities etc. instead of the full hotel-country-city tables. Size matters because im gonna put it in a small free cloud db.
Age of Mythology forever!
phar
Profile Joined August 2011
United States1080 Posts
August 05 2016 16:09 GMT
#14983
Create a new one from scratch that has a tiny subset of all the things you see from whatever example queries you're going to run. It should not be hard to enumerate (even manually) if you're actually talking 4-5 entries per table.


Or, throw money at it if the time is too expensive.
Who after all is today speaking about the destruction of the Armenians?
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
August 05 2016 20:02 GMT
#14984
found something like http://jailer.sourceforge.net/ . going to filddle with it a little before getting hands dirty
Age of Mythology forever!
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
August 05 2016 23:53 GMT
#14985
On August 06 2016 01:09 phar wrote:
Create a new one from scratch that has a tiny subset of all the things you see from whatever example queries you're going to run. It should not be hard to enumerate (even manually) if you're actually talking 4-5 entries per table.


Or, throw money at it if the time is too expensive.


Exactly. Create a fresh DB and then perhaps implement a faker to fill it up with some basic, random data to fill it up with and off you go.
Time is precious. Waste it wisely.
EscPlan9
Profile Blog Joined December 2006
United States2777 Posts
Last Edited: 2016-08-06 04:49:57
August 06 2016 04:49 GMT
#14986
Any suggestions for introducing a group of developers with varying degrees of experience to unit testing?

A little background:
I recently joined a new company (a little more than a month ago), and the application they develop is written in C# .NET using MVC design pattern. There are 100s of classes and some contain over 10,000 lines of code. There also are 0 unit tests, so in this sense I am working on legacy code.

We have weekly developer sit-down meetings once a week to discuss what we're working on, etc, and I've been able to get a few people on board with pushing for introducing unit testing. I've shown the most interest and so have taken the initiative with heading this venture. We've decided on simple MSTest for the runner, Moq for mocking the external sources, and Fluent Assertions just for readability and easier assertion writing.

A few general notes:
1) Some people have never written a unit test ever before.
2) We currently use Subversion for version control, though the push to move to Git or something where we can do some form of "gated checkins" is another endeavor.
3) Though I am interested and understand the value of unit testing, I am not an expert on it. None of us are very proficient at it for that matter.
4) Others understand the importance of unit testing, but the main issue is them not knowing how to test and then the usual pushbacks of "not enough time to write them"
5) We are using VS 2012 at the moment, hoping to upgrade it to VS 2015 eventually. I notice VS 2015 has some convenience features for unit testing for instance that we don't get in 2012 editions.

My main questions...:
1) What are some tools, tips, or extensions we can use to decrease the amount of time spent with the initial setup of a unit test?
2) More generally, what is a good way to help convince others that not only are unit tests important (we all agree on that), but that they should put in the effort to do it themselves?
3) Have you been in a similar situation before and how did you handle it?
Undefeated TL Tecmo Super Bowl League Champion
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
August 06 2016 12:09 GMT
#14987
Ad.3.
At the previous company I worked for we were in this situation. How we handled it was learning unit tests by doing them for some of the core functionality of the product (we did unit, acceptance and integration tests). Obviously this didn't cover much but we learned the ropes and didn't stress over it too much. We basically treated this endeavour as pure practice. Where we actually implemented it was in projects which came after that (we tried to do real TDD from then on). We would also use it if new functionality should be added to the old projects but it's rarely the case with stable stuff that's been running for years without much change.
Time is precious. Waste it wisely.
graNite
Profile Blog Joined December 2010
Germany4434 Posts
August 07 2016 19:31 GMT
#14988
I want to create table tennis exercise plans like this one
[image loading]
Is it possible to code an HTML5 online editor that creates these with a WYSIWYG front? So you can drag arrows, highlight areas etc.. all in the browser and then export.
Where do I even start if I want to create this?
"Oink oink, bitches" - Tasteless on Pigbaby winning a map against Flash
tofucake
Profile Blog Joined October 2009
Hyrule19151 Posts
August 07 2016 19:42 GMT
#14989
yes

look into canvases, though you'll need javascript for mouse interaction, I think
Liquipediaasante sana squash banana
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
Last Edited: 2016-08-07 19:52:23
August 07 2016 19:51 GMT
#14990
On August 08 2016 04:31 graNite wrote:
I want to create table tennis exercise plans like this one
[image loading]
Is it possible to code an HTML5 online editor that creates these with a WYSIWYG front? So you can drag arrows, highlight areas etc.. all in the browser and then export.
Where do I even start if I want to create this?


Here's a start, but definitely possible:

http://www.unionplatform.com/?page_id=2762

Works on mobile too
Life?
nnn_thekushmountains
Profile Joined February 2016
1501 Posts
August 07 2016 22:02 GMT
#14991
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
August 08 2016 00:40 GMT
#14992
On August 08 2016 07:02 nnn_thekushmountains wrote:
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?


This is more like the downside to using Node... I've noticed with heavy data apps, it tends to slow down on the user side heavily. Socket.io is a real time data solution, so that can help in the front side.
Life?
Manit0u
Profile Blog Joined August 2004
Poland17421 Posts
August 08 2016 06:35 GMT
#14993
On August 08 2016 07:02 nnn_thekushmountains wrote:
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?


Why are you saving data to the DB every 10 seconds? And what kind of data? Is it huge amounts of data? How relevant is this? How far back do you have to go in the data history? How often is data received from the DB?

Those are all pretty relevant questions pertaining to your problem.
Time is precious. Waste it wisely.
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
August 08 2016 08:09 GMT
#14994
On August 08 2016 07:02 nnn_thekushmountains wrote:
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?

If you post shit on the UI thread (which you do), user thinks that page is constantly loading.

Solution: Use background threads, in other words, workers.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
"windows bash is a steaming heap of shit" tofucake
nnn_thekushmountains
Profile Joined February 2016
1501 Posts
August 08 2016 11:08 GMT
#14995
On August 08 2016 17:09 Djagulingu wrote:
Show nested quote +
On August 08 2016 07:02 nnn_thekushmountains wrote:
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?

If you post shit on the UI thread (which you do), user thinks that page is constantly loading.

Solution: Use background threads, in other words, workers.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers


This looks like a good solution. The only problem is that my digital ocean $5/month server only has one worker.

On August 08 2016 15:35 Manit0u wrote:
Show nested quote +
On August 08 2016 07:02 nnn_thekushmountains wrote:
I used express and mongodb to make a single page app.
When the page loads, a bunch of information comes from the database through the view (EJS) into static javascript, where it is used.
Google maps does some stuff with the information.
Every 10 seconds, I am POSTing new information back to the server side to be stored in the database.

Is this bad? From the users end, it looks like the page is constantly loading. Do I need to start using websockets (socket.io)?


Why are you saving data to the DB every 10 seconds? And what kind of data? Is it huge amounts of data? How relevant is this? How far back do you have to go in the data history? How often is data received from the DB?

Those are all pretty relevant questions pertaining to your problem.


Right now I'm just posting lat lng coords to the server, so that when the user quits, the database will contain their location.
Every 10 seconds the client posts, and the server writes the information to the database.
Data is received from the database only when the user loads the page.

The next iteration will also be reading data from the database and sending it to the client every 10 seconds, which will allow the user to see other user's on the map with him.
tofucake
Profile Blog Joined October 2009
Hyrule19151 Posts
August 08 2016 12:39 GMT
#14996
sounds like you have in mind a project that needs more worker threads
Liquipediaasante sana squash banana
WhiteDog
Profile Blog Joined November 2010
France8650 Posts
Last Edited: 2016-08-08 12:52:45
August 08 2016 12:44 GMT
#14997
I want anybody's advice.

So, shit is funny if it was not disastrous. I downloaded a stupid movie for my wife (stupidass four fantastic which I'm sure is complete shit) and dragged a "ransomware" called cerber. So it encrypted all my files - ten years of work, but I have most of it printed somewhere, and parts saved in USB keys and in my other portable PC.
What I lost for sure tho are some photos which are dear to me, and a few papers that I didn't saved and haven't finished (specifically freaking notes about a book I was reading and that took me ages to write...).

Basically, according to everything I've read, I can't get that data unless I pay the ransom, which is 500 USD (that I don't have). Anybody have some knowledge on the subject and give me his point of view ? It's dead ? Should I keep the datas somewhere ? Or should I format everything, drink some whisky, and accept my idiocy ?
"every time WhiteDog overuses the word "seriously" in a comment I can make an observation on his fragile emotional state." MoltkeWarding
tofucake
Profile Blog Joined October 2009
Hyrule19151 Posts
August 08 2016 12:46 GMT
#14998
Nah, they usually delete the key after a couple days and it's gone forever
Liquipediaasante sana squash banana
nnn_thekushmountains
Profile Joined February 2016
1501 Posts
August 08 2016 12:52 GMT
#14999
On August 08 2016 21:39 tofucake wrote:
sounds like you have in mind a project that needs more worker threads

So socket.io alone is not going to solve all my problems?
WhiteDog
Profile Blog Joined November 2010
France8650 Posts
Last Edited: 2016-08-08 13:10:40
August 08 2016 13:10 GMT
#15000
On August 08 2016 21:46 tofucake wrote:
Nah, they usually delete the key after a couple days and it's gone forever

And without the key, uncrypting the files is impossible, even in two or three years ?
"every time WhiteDog overuses the word "seriously" in a comment I can make an observation on his fragile emotional state." MoltkeWarding
Prev 1 748 749 750 751 752 1032 Next
Please log in or register to reply.
Live Events Refresh
CranKy Ducklings
10:00
Sea Duckling Open #140
CranKy Ducklings84
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 198
Railgan 42
Creator 14
StarCraft: Brood War
Sea 6776
Horang2 4135
GuemChi 1585
Jaedong 890
actioN 290
Mini 250
BeSt 249
Soma 228
Killer 218
EffOrt 205
[ Show more ]
Rush 172
Mind 105
Hyun 95
Bonyth 72
ToSsGirL 67
Backho 60
PianO 34
JYJ32
sas.Sziky 32
Aegong 28
zelot 23
Terrorterran 14
soO 11
sorry 10
HiyA 7
Sacsri 7
Dota 2
Gorgc5272
singsing2292
qojqva1976
Dendi596
XcaliburYe219
BananaSlamJamma107
Heroes of the Storm
Khaldor214
Other Games
B2W.Neo1235
Sick275
Lowko237
Fuzer 197
Hui .121
XaKoH 87
nookyyy 56
MindelVK20
Organizations
StarCraft 2
WardiTV622
Counter-Strike
PGL231
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 73
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2101
League of Legends
• Stunt689
• HappyZerGling108
Upcoming Events
IPSL
4h 4m
dxtr13 vs OldBoy
Napoleon vs Doodle
LAN Event
4h 4m
Lambo vs Clem
Scarlett vs TriGGeR
ByuN vs TBD
Zoun vs TBD
BSL 21
6h 4m
Gosudark vs Kyrie
Gypsy vs OyAji
UltrA vs Radley
Dandy vs Ptak
Replay Cast
9h 4m
Sparkling Tuna Cup
20h 4m
WardiTV Korean Royale
22h 4m
LAN Event
1d 1h
IPSL
1d 4h
JDConan vs WIZARD
WolFix vs Cross
BSL 21
1d 6h
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
1d 19h
[ Show More ]
Wardi Open
1d 22h
WardiTV Korean Royale
2 days
Replay Cast
3 days
Kung Fu Cup
3 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
4 days
The PondCast
4 days
RSL Revival
4 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
RSL Revival
5 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
5 days
CranKy Ducklings
6 days
RSL Revival
6 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 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.