• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:37
CET 16:37
KST 00:37
  • 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 - 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[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion What happened to TvZ on Retro? Brood War web app to calculate unit interactions [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
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
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2257 users

The Big Programming Thread - Page 590

Forum Index > General Forum
Post a Reply
Prev 1 588 589 590 591 592 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.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2015-02-19 18:59:01
February 19 2015 18:43 GMT
#11781
On February 19 2015 01:46 Nesserev wrote:
Show nested quote +
On February 18 2015 22:14 nunez wrote:
i must profess my love for std::list:
a beautiful contraption.


I almost never use std::list. Stroustrup pointed out in one of his presentations that you should almost always prefer std::vector over std::list in practice, even though, theoretically, there are a lot of uses for lists.

The biggest disadvantage of std::vector is of course that insertion/deletion somewhere in the vector, requires the repositioning of all elements behind the inserted/deleted element(s). Note that insertion/deletion at the back of the vector is amortized constant time.

On the other hand, insertion/deletion is constant time anywhere in linked lists. The biggest disadvantage of linked lists is that it's rather bad at some very convenient stuff, like size(), or access through an index (which is why these are not provided by the stl).

Now here's the big hidden factor for why you shouldn't use lists: iteration.
It's the only way to access the elements in a linked list, and it's also possible to do in a vector.

If you iterate over all the elements of a vector, the iterator will just jump one object space further in memory to access the next element, which is very efficient. If you iterate over all the elements of a linked list, the iterator has to jump through memory to wherever the next element is. This form of access is very expensive, especially if you have list of millions of elements.

If one were to compare the frequency and cost of moving elements in a vector, to that of iterating the elements of a list, the conclusion would be that the list will always perform worse than the vector. Of course, the way I presented it probably leaves room for some fallacies and discussion, but trust me on this one.

From the point of view of a programming language, I very much do like the std::list class. Its interface is just so elegant. std::forward_list is an abomination though... first person I see using that class, gets a dropkick in the face.


Why? Isn't that class supposed to be an optimised version of List if you only need forward iteration? I can't think of a possible use case but I'm sure it fits some purpose.

Edit: There you go: http://stackoverflow.com/a/11563749

As I previously said, it's probably for optimisation purposes. E.g. on embedded systems?

Isn't the difference too high though? I thought pointers are relatively cheap in terms of memory, and doesn't doubly link list just have one extra pointer which points to the previous node?
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-19 18:51:07
February 19 2015 18:48 GMT
#11782
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-02-19 20:37:32
February 19 2015 20:36 GMT
#11783
On February 20 2015 03:43 darkness wrote:
Show nested quote +
On February 19 2015 01:46 Nesserev wrote:
On February 18 2015 22:14 nunez wrote:
i must profess my love for std::list:
a beautiful contraption.


I almost never use std::list. Stroustrup pointed out in one of his presentations that you should almost always prefer std::vector over std::list in practice, even though, theoretically, there are a lot of uses for lists.

The biggest disadvantage of std::vector is of course that insertion/deletion somewhere in the vector, requires the repositioning of all elements behind the inserted/deleted element(s). Note that insertion/deletion at the back of the vector is amortized constant time.

On the other hand, insertion/deletion is constant time anywhere in linked lists. The biggest disadvantage of linked lists is that it's rather bad at some very convenient stuff, like size(), or access through an index (which is why these are not provided by the stl).

Now here's the big hidden factor for why you shouldn't use lists: iteration.
It's the only way to access the elements in a linked list, and it's also possible to do in a vector.

If you iterate over all the elements of a vector, the iterator will just jump one object space further in memory to access the next element, which is very efficient. If you iterate over all the elements of a linked list, the iterator has to jump through memory to wherever the next element is. This form of access is very expensive, especially if you have list of millions of elements.

If one were to compare the frequency and cost of moving elements in a vector, to that of iterating the elements of a list, the conclusion would be that the list will always perform worse than the vector. Of course, the way I presented it probably leaves room for some fallacies and discussion, but trust me on this one.

From the point of view of a programming language, I very much do like the std::list class. Its interface is just so elegant. std::forward_list is an abomination though... first person I see using that class, gets a dropkick in the face.


Why? Isn't that class supposed to be an optimised version of List if you only need forward iteration? I can't think of a possible use case but I'm sure it fits some purpose.

Edit: There you go: http://stackoverflow.com/a/11563749

As I previously said, it's probably for optimisation purposes. E.g. on embedded systems?

Isn't the difference too high though? I thought pointers are relatively cheap in terms of memory, and doesn't doubly link list just have one extra pointer which points to the previous node?


-misread-
There is no one like you in the universe.
bangsholt
Profile Joined June 2011
Denmark138 Posts
February 19 2015 22:24 GMT
#11784
On February 20 2015 03:43 darkness wrote:
As I previously said, it's probably for optimisation purposes. E.g. on embedded systems?


If you're doing safety critical embedded development, dynamic allocation is a big no-no, so lists and vectors are not very useful in this regard.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
February 19 2015 22:29 GMT
#11785
the stl containers are templated on allocator.
conspired against by a confederacy of dunces.
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
Last Edited: 2015-02-19 22:45:55
February 19 2015 22:44 GMT
#11786
On February 20 2015 07:24 bangsholt wrote:
Show nested quote +
On February 20 2015 03:43 darkness wrote:
As I previously said, it's probably for optimisation purposes. E.g. on embedded systems?


If you're doing safety critical embedded development, dynamic allocation is a big no-no, so lists and vectors are not very useful in this regard.


Not exactly true as a ton of embedded applications use heap and dynamic page mapping to use large swaths of memory temporarily without crippling the system. Many embedded OS have filesystems and networking stacks which both benefit greatly from dynamic allocation.

The worst case, when every greedy module in the system needs its maximum memory at the same time, should not halt your critical programs, and when such a day comes, low priority modules should fail gracefully when you get an allocation failure. Of course, it's simpler to just not malloc or grab any dynamic memory.

It is pretty rare to see an embedded C++ program use STL, even now with 2.4GHz 48 core embedded systems with 4GB of RAM, but it does happen. I recall a recent military aviation project I worked on does, but thats not surprising given the defense industry's usual program bloat.+ Show Spoiler +
I just realized some of these embedded projects are more powerful than my gaming rig
Any sufficiently advanced technology is indistinguishable from magic
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2015-02-19 23:19:04
February 19 2015 23:15 GMT
#11787
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17432 Posts
February 20 2015 01:23 GMT
#11788
On February 20 2015 03:48 FFGenerations wrote:
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys


You may want to read up on web services. Decide if you want to use REST or SOAP and go for it

Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-20 02:32:33
February 20 2015 02:32 GMT
#11789
On February 20 2015 10:23 Manit0u wrote:
Show nested quote +
On February 20 2015 03:48 FFGenerations wrote:
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys


You may want to read up on web services. Decide if you want to use REST or SOAP and go for it



tnx i remembered that just now lol. im so shit. my grades are all fail so far but i heard they discount your worst grade in my special case so i dodged a bullet there. only 2 months then i can look for a job...dont care what job just want a job XD

errr that was a pm but whatever lol
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
berated-
Profile Blog Joined February 2007
United States1134 Posts
Last Edited: 2015-02-20 02:45:25
February 20 2015 02:34 GMT
#11790
On February 20 2015 10:23 Manit0u wrote:
Show nested quote +
On February 20 2015 03:48 FFGenerations wrote:
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys


You may want to read up on web services. Decide if you want to use REST or SOAP and go for it



I think he's consuming the services, not implementing them.

Does it have to be part of the full EE stack or just a java webapp? Which container are you running in?

Guess I'll just elaborate without answers.. if it has to be EE and you are using glassfish there isn't really a whole lot of flexibility or even reason to look at options. Start looking at JSF tutorials.

If not, and you are just running in tomcat, you can try spring mvc which might more quickly help you get going with users. If it just has to be java-ish, groovy on grails could get you going.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-20 03:17:05
February 20 2015 03:14 GMT
#11791
On February 20 2015 11:34 berated- wrote:
Show nested quote +
On February 20 2015 10:23 Manit0u wrote:
On February 20 2015 03:48 FFGenerations wrote:
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys


You may want to read up on web services. Decide if you want to use REST or SOAP and go for it



I think he's consuming the services, not implementing them.

Does it have to be part of the full EE stack or just a java webapp? Which container are you running in?

Guess I'll just elaborate without answers.. if it has to be EE and you are using glassfish there isn't really a whole lot of flexibility or even reason to look at options. Start looking at JSF tutorials.

If not, and you are just running in tomcat, you can try spring mvc which might more quickly help you get going with users. If it just has to be java-ish, groovy on grails could get you going.


thanks dude. im using java EE with glassfish and have gone through the netbeans tutorial https://netbeans.org/kb/docs/javaee/ecommerce/intro.html which seems to just go on FOREVER with so many minute details, its insane .

thats as far as i got so far. my personal tutor (doesnt take me for any classes, nor do i have any web or java classes) is into the core java EE with netbeans and no frameworks and so im just gonna use that......

i am consuming the services. so it should be pretty simple thing, i just need example or tutorial or something to go through. then i can start to design the whole thing somehow XD

ill search "jsf rest tutorial" and go from there i guess (tho i welcome further comments :D ) tnx all
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Manit0u
Profile Blog Joined August 2004
Poland17432 Posts
February 20 2015 03:26 GMT
#11792
On February 20 2015 11:34 berated- wrote:
Show nested quote +
On February 20 2015 10:23 Manit0u wrote:
On February 20 2015 03:48 FFGenerations wrote:
hey guys, quick question

i need to do a project to make a java web application (mvc website with its own users database) that allows a user to search a 3rd party website database using its API like http://www.animenewsnetwork.com/encyclopedia/api.php or like the IMDB database API.

e.g. user searches for movie , my website sends the request to IMDB or ANN website , retrieves XML and displays a response to my user

would it be possible for someone to point me in the right direction with maybe a tutorial (youtube or google or otherwise) or keywords so i can search for how to do this in java EE? any keyword or hint would be wonderful

thanks guys


You may want to read up on web services. Decide if you want to use REST or SOAP and go for it



I think he's consuming the services, not implementing them.

Does it have to be part of the full EE stack or just a java webapp? Which container are you running in?

Guess I'll just elaborate without answers.. if it has to be EE and you are using glassfish there isn't really a whole lot of flexibility or even reason to look at options. Start looking at JSF tutorials.

If not, and you are just running in tomcat, you can try spring mvc which might more quickly help you get going with users. If it just has to be java-ish, groovy on grails could get you going.


Well, even for consuming the services you might want to introduce a service that communicates with external service. Then you have it all nice and well. Some REST api serving the content from external api directly to your users via ajax calls and what not.
Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-20 05:28:42
February 20 2015 05:21 GMT
#11793
does this logic make sense or am i overcomplicating it? is this too many database actions or is this normal?

use case: on my website, user wants to create a list of his favourite movies

1) User searches for a movie
2) System requests search result of movie names + thumbnail picture URLs from external website (consuming 3rd party REST API)
3) System displays search results to user (movie name + thumbnail image)
4) User clicks on a search result
5) System adds the clicked movie's name + thumbnail URL to a temporary storage list (session state?????)
6) User makes more searches and clicks on more results
7) User clicks Finish
8) System updates my database with movieID movie names + thumbnail URLs
9) System updates my database with a movie list ListID that contains the selected movieID movies
10) System generates an image consisting of ListID's movieID thumbnails (so we have 1 composite picture showing all movies in 1 jpg picture)
11) System updates my database ListID to insert the URL of the generated image
12) System updates my database, adding ListID to user's UserID
( 13) System takes user to UserID's ListID page )
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
February 20 2015 08:18 GMT
#11794
8 and 9 are a bit questionable. Why are you storing the Movie names and their Thumbnails in your own database when every user accesses them from the 3rd party every time? Seems like you're storing information and files that won't be accessed again.
Average means I'm better than half of you.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-20 09:29:44
February 20 2015 09:26 GMT
#11795
so....the movie data will be needed:

1) when a user performs a search

2) when a user pulls up one of his saved movie lists (to view or edit it)

so when we save the user's movie list we might aswell save the thumbnail url of the movies along with their names

theoretically if we're saving these to our own database we could check this database before performing any search request to the 3rd party API .........

i wonder what performance impact that would have, if we're trying to access our own database and then the 3rd party one if nothing is found? the other issue with this is that it would remove freshness of directly accessing the 3rd party database.....

does that make sense? (the fact that we're storing the user's movie lists for future use)

lets change 13 to say...

13) System takes user to user's ListID page which displays his list of movies alongside their thumbnail images and offers the hyperlink to his generated composite jpeg, a link to edit the list and a link to delete the list. (users can have multiple saved lists)
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Manit0u
Profile Blog Joined August 2004
Poland17432 Posts
Last Edited: 2015-02-20 10:28:28
February 20 2015 10:26 GMT
#11796
Sounds like all you need to store is the list of movie ids and your generated image. Then you grab the list from your DB and send a request to the 3rd party based off of that.

Storing movie urls and thumbnails in your DB is definitely not necessary. Testing your DB before the 3rd party one kind of defeats the purpose and adds unnecessary problems:

1. More DB queries = not good.
2. More stuff in the DB = not good.
3. Possibility of outdated data = not good (although it might be counter-balanced by it working even if 3rd party api/site is down, but that's an edge case).

Updated flowchart:
1) User searches for a movie
2) System requests search result of movie names + thumbnail picture URLs from external website (consuming 3rd party REST API)
3) System displays search results to user (movie name + thumbnail image)
4) User clicks on a search result
5) System adds the clicked movie's name + thumbnail URL to a temporary storage list (session state?????)
6) User makes more searches and clicks on more results
7) User clicks Finish
8) System generates an image consisting of movie thumbnails (so we have 1 composite picture showing all movies in 1 jpg picture)
9) System updates my database with a movie list that contains the selected movies, composite image and user id
10) System takes user to user's movie list page

Notice only 1 DB query instead of 4 in the original idea and 3 less steps to take. It could even be optimized further.

All you need is a single table (movieList) with fields:
movies - storing the movie id's, how you do it is up to you, json, ; delimited string etc.
picture - for your composite picture resource (url)
user_id - to link the list with the user

You can update all the fields at once, with a single query. Don't forget to create the many-to-one relation on the lists-to-user tables.
Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-02-20 10:38:54
February 20 2015 10:35 GMT
#11797
what happens when the user goes to view/edit his list? i want him to be able to search/edit the list and this would involve displaying to him the individual title's thumbnail images again (not the composite image)

1) user clicks edit list
2) system sends a request to the API to retrieve the thumbnail image urls of the titles
3) system displays the thumbnail images

do you see what i mean by needing the thumbnail images still? the composite image is just a one-off side-product


i just saw my tutor and he said i might want to store the actual thumbnail images myself and employ a caching technique to ensure freshness (like .... update them once a week or some other stuff)
(he also said you wont know unless you hurry up and implement something)

ill re-read your post in a bit
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-02-20 11:15:13
February 20 2015 10:39 GMT
#11798
that's stupid and you shouldn't listen to your teacher, you shouldn't be caching images if all you're doing is retrieving image urls. totally unnecessary. let the user's client cache the images (what are you building the frontend as anyways)

i feel like you're planning this way too much. this isn't a type of project that needs to be scoped out so definitively (unless the scoping is part of the project?). i'd be a lot more iterative and prototypy with this. you're going to have so many more requirements (frankly i'm not sure you've outlined all of your requirements for yourself well yet from what i'm reading) that it doesn't make sense to focus so hard on perfecting the system, when it's going to change subject to any other requirements you have.... don't think about caching and optimizing until you actually run into problems with it.

(sorry in advance if i sound angry/unreasonably mean btw, i think it's the lack of caps)
(also no clue if you're focusing hard on this or just asking a question that blew up cause everyone has a response)
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17432 Posts
Last Edited: 2015-02-20 10:55:57
February 20 2015 10:54 GMT
#11799
On February 20 2015 19:35 FFGenerations wrote:
what happens when the user goes to view/edit his list? i want him to be able to search/edit the list and this would involve displaying to him the individual title's thumbnail images again (not the composite image)

1) user clicks edit list
2) system sends a request to the API to retrieve the thumbnail image urls of the titles
3) system displays the thumbnail images

do you see what i mean by needing the thumbnail images still? the composite image is just a one-off side-product


i just saw my tutor and he said i might want to store the actual thumbnail images myself and employ a caching technique to ensure freshness (like .... update them once a week or some other stuff)
(he also said you wont know unless you hurry up and implement something)

ill re-read your post in a bit


You didn't get me. You store your composite image because that's something you can't get from the 3rd party and generating it every time is a waste of resources. You also only store movie ids as they figure in the 3rd party api so that when the user requests the list you make an external call of "gief names + thumbnails for movies: mov1, mov2, mov3...". No need to store them in your own DB. Also, thumbnails will link to the 3rd party servers, which have cached it already and so probably did your user's browser.

Don't add extra work for your system and yourself if it's not necessary.

Pretty much what Blisse said, but at the time of writing this his post was empty
Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
February 20 2015 11:36 GMT
#11800
that makes sense, thanks both
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Prev 1 588 589 590 591 592 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 1h 24m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 418
Reynor 55
mcanning 52
LamboSC2 29
MindelVK 1
StarCraft: Brood War
Britney 34380
Rain 3498
Horang2 1418
actioN 1169
Jaedong 1075
Shuttle 491
Stork 472
EffOrt 278
firebathero 239
PianO 127
[ Show more ]
Leta 115
Barracks 113
Shinee 108
ggaemo 92
LaStScan 89
Hyun 82
Shine 52
JYJ42
Mong 35
Rock 32
Bale 23
Movie 22
ToSsGirL 20
soO 17
HiyA 13
zelot 11
Oystein6
Dota 2
Gorgc5982
qojqva1816
Dendi1035
XcaliburYe134
LuMiX0
Heroes of the Storm
Khaldor280
Liquid`Hasu5
Other Games
B2W.Neo2061
Hui .339
Lowko321
DeMusliM286
Fuzer 186
febbydoto8
Mlord2
Organizations
Dota 2
PGL Dota 2 - Main Stream10616
PGL Dota 2 - Secondary Stream2066
Other Games
EGCTV479
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• StrangeGG 73
• HeavenSC 18
• IndyKCrew
• AfreecaTV YouTube
• intothetv
• Kozan
• sooper7s
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Michael_bg 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 1712
• Ler64
League of Legends
• Nemesis3096
Other Games
• WagamamaTV276
Upcoming Events
IPSL
1h 24m
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
3h 24m
BSL 21
4h 24m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
18h 24m
RSL Revival
18h 24m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
20h 24m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
20h 24m
BSL 21
1d 4h
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d 4h
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 7h
[ Show More ]
Wardi Open
1d 20h
Monday Night Weeklies
2 days
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
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
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
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
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.