|
Lord Uffenham posted:You should try Smalltalk. Surprisingly this applies to a lot of different problems sh/sc-ers have.
|
| # ¿ Mar 9, 2009 22:27 |
|
|
| # ¿ May 19, 2013 05:21 |
|
fletcher posted:How do you ask a senior developer about the formatting of their code without offending them? Auto-format as you come across them? As long as everyone agrees on the format auto-format generates, you're golden
|
| # ¿ Dec 10, 2009 08:21 |
|
shrughes posted:Many of the people here learned programming with nothing more than the TI-83 manual and trial and error. How many of us are out there...
|
| # ¿ Apr 19, 2010 10:14 |
|
Learning english just comes with the territory. Almost all useful support is in english, the language itself is english and most code is written with english speakers in mind.
|
| # ¿ Dec 29, 2010 13:20 |
|
pokeyman posted:The way I see it, if you're trying to make a living writing code, most of what you write will eventually be either written in C, call into something written in C (the OS, the language runtime, some library you're using), or run on something written in C (a virtual machine, an interpreter). It's really hard to ignore. And yet you never have to touch any of it! Amazing.
|
| # ¿ Apr 6, 2012 09:44 |
|
Suspicious Dish posted:A large amount of the patterns in GoF feel like they're just workarounds for the lack of first-class functions. A large number of them also don't feel notable. I've never heard patterns described like this but it makes perfect sense. Doctor w-rw-rw- posted:Flash isn't a dying platform, it's an undead platform, because it 's still around (of course it's still everywhere), and isn't going away - but it's not particularly alive, either. So like java? :that emoticon tef uses all the time:
|
| # ¿ May 16, 2012 07:59 |
|
Actually you should be using something more akin to notepad but since you're following a class isn't there a teacher you can ask class-specific questions like this?
|
| # ¿ May 22, 2012 22:23 |
|
jjttjj posted:Is it acceptable to not model the various image sizes for a given image in the database? Like, to just basically have the image filename as an attribute for Image, and then organize the image sizes in the file system with a different directory for each image size, with the directories set via config variables? And then I could maybe just have a function that gives me the appropriate image path for a given image and filename. This would also mean I don't have to store the actual full image path with the image metadata, just the filename. Is there any reason that I'm missing that this is a bad idea? jjttjj posted:Would it be better to relate Images to another table Image_Sizes in a many:many relationship so that I could be able to tell if an image size exists without having to do file stuff? Would this be necessarily or strictly better only if some images will not be available in all sizes, or is it a good idea in general to add flexibility to the app in the future? jjttjj posted:Lastly, let's say there's another entity User which will also have a couple images associated with it. Should these images be stored in the same exact manner and in the same table as the Thing Images? Or should there be separate image tables for each? Should all images for all entities be stored in one table? 3 tables. Entity : all the columns you need for entities, plus id Images : all the columns you need for images, plus id, plus filename EntityImages : A junction table that has both entity_id and image_id, plus any specific columns that relate to the entity (example: ordering for albums, which image is the avatar, etc.) Then you can decide in your code whether to save all images in the same folder, a folder per entity, whatever.
|
| # ¿ Jun 23, 2012 23:09 |
|
rolleyes posted:If you don't want duplicates then, as you've recognised, you can't just generate 6 random choices. One way to approach it is to rephrase the problem as taking the first 6 images from a randomly ordered set. This could be achieved by performing a Fisher-Yates shuffle on your list of images and then selecting the first 6 results from the resulting shuffled list. Do this. rolleyes posted:If you don't want to be performing the shuffle every time you reload the page (for example, if you have a very large list of images) you could store the shuffled list some manner and keep an offset into it which is incremented by 6 whenever the page is loaded. When offset + 6 > listSize, you reshuffle the list, store it again and set the offset back to zero. Don't do this. Shuffling a list is laughably easy work for a browser.
|
| # ¿ Jul 28, 2012 20:16 |
|
Google spreadsheet.
|
| # ¿ Sep 10, 2012 07:04 |
|
|
| # ¿ May 19, 2013 05:21 |
|
tarepanda posted:Is lambda syntax consistent across languages? What languages?
|
| # ¿ Dec 10, 2012 11:47 |




