Search Results

Search found 3598 results on 144 pages for 'joe coder guy'.

Page 2/144 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Coder rapidement ou écrire du code de qualité ? Les deux approches reviendraient au même, selon un célèbre développeur dessinateur

    Coder rapidement ou écrire du code de qualité ? Les deux approches reviennent au même, selon un célèbre web-bédéiste XKCD est une célèbre bande-dessinée créée et publiée par Randall Munroe, un ancien consultant à la NASA, qui la définit comme un webcomic sarcastique qui parle de romance, de maths et de langage. Une planche publiée récemment sous forme d'organigramme algorithmique n'a d'autre prétention que celle de résumer, d'une manière extrêmement pessimiste, le métier de développeur. Les développeurs seraient, selon Munroe, éternellement confronté au dilemme : coder rapidement ou coder correctement. Ceux qui prennent la décision de "coder corr...

    Read the article

  • iPhone - archiving array of custom objects

    - by Dylan
    I've been trying for hours and I cannot solve this problem. I'm making an app that saves unfinished Chess Games, so I'm trying to write an array to a file. This is what the array is, if it makes sense: -NSMutableArray savedGames --GameSave a ---NSMutableArray board; ----Piece a, b, c, etc. -----some ints ---NSString whitePlayer, blackPlayer; ---int playerOnTop, turn; --GameSave b ---NSMutableArray board; ----Piece a, b, c, etc. -----some ints ---NSString whitePlayer, blackPlayer; ---int playerOnTop, turn; etc. And these are my NSCoding methods: GameSave.m - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeObject:whitePlayer forKey:@"whitePlayer"]; [coder encodeObject:blackPlayer forKey:@"blackPlayer"]; [coder encodeInt:playerOnTop forKey:@"playerOnTop"]; [coder encodeInt:turn forKey:@"turn"]; [coder encodeObject:board forKey:@"board"]; } - (id)initWithCoder:(NSCoder *)coder { self = [[GameSave alloc] init]; if (self != nil) { board = [coder decodeObjectForKey:@"board"]; whitePlayer = [coder decodeObjectForKey:@"whitePlayer"]; blackPlayer = [coder decodeObjectForKey:@"blackPlayer"]; playerOnTop = [coder decodeIntForKey:@"playerOnTop"]; turn = [coder decodeIntForKey:@"turn"]; } return self; } Piece.m - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeInt:color forKey:@"color"]; [coder encodeInt:piece forKey:@"piece"]; [coder encodeInt:row forKey:@"row"]; [coder encodeInt:column forKey:@"column"]; } - (id)initWithCoder:(NSCoder *)coder { self = [[Piece alloc] init]; if (self != nil) { color = [coder decodeIntForKey:@"color"]; piece = [coder decodeIntForKey:@"piece"]; row = [coder decodeIntForKey:@"row"]; column = [coder decodeIntForKey:@"column"]; } return self; } And this is the code that tries to archive and save to file: - (void)saveGame { ChessSaverAppDelegate *delegate = (ChessSaverAppDelegate *) [[UIApplication sharedApplication] delegate]; [[delegate gameSave] setBoard:board]; NSMutableArray *savedGames = [NSKeyedUnarchiver unarchiveObjectWithFile:[self dataFilePath]]; if (savedGames == nil) { [NSKeyedArchiver archiveRootObject:[delegate gameSave] toFile:[self dataFilePath]]; } else { [savedGames addObject:[delegate gameSave]]; [NSKeyedArchiver archiveRootObject:savedGames toFile:[self dataFilePath]]; } } - (NSString *)dataFilePath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:@"gameSaves.plist"]; } Sorry, here's the problem: After setting some breakpoints, an error is reached after this line from -saveGame: [NSKeyedArchiver archiveRootObject:savedGames toFile:[self dataFilePath]]; And this is what shows up in the console: 2010-05-11 17:04:08.852 ChessSaver[62065:207] *** -[NSCFType encodeWithCoder:]: unrecognized selector sent to instance 0x3d3cd30 2010-05-11 17:04:08.891 ChessSaver[62065:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFType encodeWithCoder:]: unrecognized selector sent to instance 0x3d3cd30' 2010-05-11 17:04:08.908 ChessSaver[62065:207] Stack: ( 32339035, 31077641, 32720955, 32290422, 32143042, 238843, 25827, 238843, 564412, 342037, 238843, 606848, 17686, 2733061, 4646817, 2733061, 3140430, 3149167, 3144379, 2837983, 2746312, 2773089, 41684313, 32123776, 32119880, 41678357, 41678554, 2777007, 9884, 9738 ) If it matters, -saveGame is called from a UIBarButton in a navigation controller. Any help is appreciated, thanks.

    Read the article

  • EC2 instance store cloning or to ebs via guy management console

    - by devnull
    I have found similar questions here but the answer are either outdated or are from the command line. The case is this. I have an EC2 instance using instance store (this was the only AMI available for Debian 6 in Ireland). Now through the AWS GUI I can do a snapshot of the instance volume and/or even create a volume. But an image made from the snapshot doesn't boot. What is the best solution to either clone an EC2 instance that uses instance store OR from the created snapshot of the instance store to launch a new EBS instance (identical clone) FROM the gui aws management console and not command line ? Before turning this down consider that there is not similar question on how to do it via the aws management console. hint can't be done is not an appropriate answer. As you can create a snapshot of the instance store backed instance and/or a volume and create an AMI from that snapshot.

    Read the article

  • vb classic coder to android how to transition?

    - by user366654
    Hi guys. I'm a VB/vba coder and would like to start android dev. Currently I'm learning Java from scratch and. Its quite tough. I've read about oop but never actually written any OO code. Java syntax is also quite foreign but I'm getting the hang of it. My question is, which is absolutely the best transition path for a vb old dog to writing for froyo?

    Read the article

  • interview questions for a 7 year Exp Guy?

    - by harigm
    What kind of approach I(5 Years Exp In Java J2ee Platform) need to follow to interview 8 years exp Guy in Java and J2ee technology. I am asking all the basic questions, where he is able to answer, if he is atleast the bookish knowledge. I want to ask some thing different where we can check his actual skills in technical. Can any one help me with some thoughts where i can use to get some good and technical challenging questions to ask?

    Read the article

  • Difference between coder and programmer in common examples, rules

    - by MInner
    Real definition is a kind of definition based on out-of-subjects axioms, rules. (Subjective, I know.) It's easy to speak about 'difference ..' with person, who's in programming. But usually it's quite hard to show difference to the person who have never used to write program. How do you think - which examples, analogies, logical chains are best for showing this kind of difference. The only example, which comes to mind is - economist (coder) and mathematician (programmer). How do you feel about it?

    Read the article

  • Dealing with "Coder's Block" (or blank form syndrome)

    - by robsoft
    I know this is the sort of somewhat open-ended question that we're discouraged from asking, but there are lots of open-ended questions around already, and this is something quite relevant to me right now. Do you ever get those times when you're about to start work on a new function/feature of an established system, and you get "coder's block"?. It's like a mental freeze at the sight of a large, completely unpopulated dialog, or an empty code file with just the stub reference headers etc. Do you ever have that 'ulp' moment that seems to sap all your momentum and leave you wide open to distractions (surfing the web for inspiration, checking out 'crackoverflow' etc)? Not that I'd wish it on anyone, but hopefully some of you do, and hopefully some of you can suggest tips or strategies for overcoming the situation, regaining your momentum and becoming productive again. I usually try to reduce what I'm about to do down to absurdly small steps, in the hope that as the job becomes just a series of 'doh' tasks, I'll kickstart myself into working through them. However sometimes, particularly when a deadline is looming, I'll get overwhelmed by this approach as I realise I probably don't have enough time to do all of those tiny steps properly. Those are the darkest moments, (often literally) just before dawn! This situation can be particularly crippling if you mostly work alone, too. Any thoughts or suggestions? Any methods that you found helpful yourself?

    Read the article

  • Good locations worldwide for a coder gypsy wannabe

    - by fung
    Yes, this is not programming related but please bear with me =). I run a small niche SaaS business. Lately I've been thinking of traveling and experiencing life in other places. Would really appreciate suggestions for good places a developer could relocate to. In particular I'm looking for a place that: Has good internet connection (cheap stable broadband, lots of places that provide free wifi, etc.) Low cost of living (rent and food fairly cheap). At least half of the population speak English. Has a local courier agent (DHL, Fedex, any...). The government allows for extended stay of foreigners. I'm thinking of staying for about 6 months at each location and maybe doing it for 3 years. So looking for 5 to 6 locations in total. So if any of you think you're staying in a place that would be great for a visiting developer then please shout out. Include as detailed a description as possible. And include any cons about the place if there are. The only place that pops to mind right now is Bali =). Isle of Skye also seems interesting but I think immigration is tight and cost of living would definitely be higher. Thanks in advance for suggestions =)

    Read the article

  • Improving as a coder with respect to design.

    - by dmarakaki
    As a soon-to-be computer science graduate, I have to come realization that I have a long way to go when it comes to the overall design of an application. After spending many semesters of programming from the hip I have come to appreciate the mulling over the needs of an application before diving head first into the coding portion. My question is to the intermediate and expert programmers, how can I improve in the area of the design phase of development?

    Read the article

  • Key Coder/Observer example for Iphone

    - by ReduxDJ
    I'm trying to implement KVO into an application, yet, I've followed the documentation provided by Apple, however I can't get it to work. I'm hoping to see a bare minimal example of how to use this with my NSObjects. My use case, is I want one item in a table-cell to update without loading the entire data in a tableView because I am loading images from URLs and I don't want to reload all of the image, while I am polling a server. Thanks,

    Read the article

  • Which adjustable ergonomic keyboard do you recommend to a fellow coder and why?

    - by thefonso
    My beloved Goldtouch has died (a moment of silence)....the hinge at the middle which allows you to adjust the board finally broke and the manufacturer does not do repairs for free. I'd have to buy a new board. So...since this I'm in the market for a new keyboard and I'm looking for an adjustable one comparable or better to the Goldentouch. I post this question to all you coders out there. Which adjustable ergo keyboard do you recommend to a fellow coder and why?

    Read the article

  • Which adjustable ergo keyboard do you recommend to a fellow coder and why?

    - by thefonso
    My beloved Goldtouch has died (a moment of silence)....the hinge at the middle which allows you to adjust the board finally broke and the manufacturer does not do repairs for free. I'd have to buy a new board. So...since this I'm in the market for a new keyboard and I'm looking for an adjustable one comparable or better to the Goldentouch. I post this question to all you coders out there. Which adjustable ergo keyboard do you recommend to a fellow coder and why?

    Read the article

  • Would a cut and paste coder ever get past a job interview?

    - by bigdave
    As a long time cut and paste coder I never committed much of the syntax of a language to memory. Even worse, I now use google to solve many of the coding problems which are of the type typically used in job interviews. This has greatly increased my productivity, the quality of the end result and stops me perpetuating the same bugs across all my code. However it means I don't actually remember the detail of the solution. For some reason in a job interview "I would look that up on google" does not seem to be the right answer. Am I better off in the interview to pass no comment on my coding style and simply pull out an iPad and produce the solution?

    Read the article

  • Quel Environnements de Développement Intégré utilisez-vous pour coder avec Symfony, le framework MVC libre en PHP ?

    Quel EDI utilisez-vous pour coder avec Symfony ? Cela fait déjà un petit temps que je développe avec symfony, en utilisant un bon vieux Notepad++. Et je remarque que, pour le C++, je code quand même bien plus vite avec un EDI plus que correct (Visual Studio) qu'avec Notepad++. Ce n'est pas le premier que je tente d'utiliser mais c'est le seul qui me convient. J'ai déjà essayé NetBeans avec support de symfony, mais je n'ai pas vraiment réussi à le prendre en main, pas hypra intuitif, etc. Ce qui fait que je suis retourné vite fait à mon Notepad++. Mais c'était au tout début du support de symfony (6.5, il me semble). Depuis, on en est à la 6.9 (7.0 en beta), est-ce que ça vaut la peine de réessayer cet EDI ? ...

    Read the article

  • As a code monkey, how to discuss programming with a guy who almost has a doctorate in computer science

    - by Peter Turner
    A friend of my wife's is coming over for dinner tonight and he is a lot smarter than me. What do we have in common, well... A Bachelor's in Computer Science, and that should be enough of a conversation starter. But he's nearly completed his doctoral studies and is light years ahead of me in his particular area, which I find fascinating but don't have any legit reason to care about (except for maybe a better way through heavy traffic - he's a combinatorics guy specializing in that I think) and I got married and had some kids and am a professional programmer for medical records software. We've got a lot in common, but there's a point where neither of us care or understand each other - although I really want to learn from him and I'm not certain he'd even want to talk about his work. So for all you doctors or code monkeys, what's a good conversation starter!

    Read the article

  • How do I become a programmer and not some guy that can type some C?

    - by Phoxxent
    From what I understand, programming has a lot more to it than learning syntax, that it involves an understanding of what happens under-the-hood and even more. Currently, I am just a guy that can pump out a few loops in Python or C and maybe make a small-scope Zork clone as the hight of skill. So, what can I do to become an actual programmer? How can I find out what I need to know and learn it? I know this has been vaguely asked before, but I kind of want an answer of how as opposed to the whats that I have seen. Would it be nice to know how real programmers define being a programmer? yes. Is that going to actually help me (or anyone else) learn what they need to learn? no. (well, maybe.)

    Read the article

  • Explain why folder's permissions differ depending on HOW user is accessing server AFP vs SSH

    - by Meltemi
    Hoping someone can explain what is probably fairly obvious...but confuses me. Imagine two users with admin privileges on our server (Mac OS X Server 10.5). Call them joe & bob. both users are members of these groups: Staff Group ID: 20 Workgroup Group ID: 1025 Shared folder "devfolder" has sharing set as so: POSIX: Owner: joe read & write Group: admin read & write Other no access ACL: Workgroup Allow Read & write Question is why when looking at same folder does the ownership appear to change depending on who's doing the looking?!? Both looking at same folder on the server: From Joe's perspective: xserve:devfolder joe$ ls -l drwxrwxr-x 6 joe workgroup 204 May 20 19:32 app drwxrwxr-x 9 joe workgroup 306 May 20 19:32 config drwxrwxr-x 3 joe workgroup 102 May 20 19:32 db drwxrwxr-x 3 joe workgroup 102 May 20 19:32 doc drwxrwxr-x 3 joe workgroup 102 May 20 19:32 lib And from Bob's perspective (folder mounted on his machine via AFP): bobmac:devfolder bob$ ls -l drwxrwxr-x 6 bob _bob 264 May 20 19:32 app drwxrwxr-x 9 bob _bob 264 May 20 19:32 config drwxrwxr-x 3 bob _bob 264 May 20 19:32 db drwxrwxr-x 3 bob _bob 264 May 20 19:32 doc drwxrwxr-x 3 bob _bob 264 May 20 19:32 lib Now if Bob connects to server via SSH then his output is identical to Joe's, as expected. Can anyone tell me what the client is doing in this case and what should be expected when bob creates or updates files in this folder? What tools do I have to better understand this from the command line? Is this normal? Perhaps a "cleaner" way that wouldn't be confusing with "bob _bob"?!?

    Read the article

  • How do I protect my company from my IT guy?

    - by Jesse
    I'm going to hire an IT guy to help manage my office's computers and network. We're a small shop, so he'll be the only one doing IT. Of course, I'll interview carefully, check references, and run a background check. But you never know how things will work out. How do I limit my company's exposure if the guy I hire turns out to be evil? How do I avoid making him the single most powerful person in the organization?

    Read the article

  • Objects with permissions assigned by django-guardian not visible in admin

    - by jul
    I'm using django-guardian in order to manage per object permission. For a given user I give permission all permission on one object: joe = User.objects.get(username="joe") mytask = Task.objects.get(pk=1) assign('add_task', joe, mytask) assign('change_task', joe, mytask) assign('delete_task', joe, mytask) and I get, as expected: In [57]: joe.has_perm("add_task", mytask) Out[57]: True In [58]: joe.has_perm("change_task", mytask) Out[58]: True In [59]: joe.has_perm("delete_task", mytask) Out[59]: True In admin.py I also make TaskAdmin inherit from GuardedModelAdmin instead of admin.ModelAdmin Now when I connect to my site with joe, on the admin I get: You don't have permission to edit anything Am I not supposed to be able to edit the object mytask? Do I have to set some permissions using the built-in model-based permission system? Am I missing anything? Thank you

    Read the article

  • Session memory – who’s this guy named Max and what’s he doing with my memory?

    - by extended_events
    SQL Server MVP Jonathan Kehayias (blog) emailed me a question last week when he noticed that the total memory used by the buffers for an event session was larger than the value he specified for the MAX_MEMORY option in the CREATE EVENT SESSION DDL. The answer here seems like an excellent subject for me to kick-off my new “401 – Internals” tag that identifies posts where I pull back the curtains a bit and let you peek into what’s going on inside the extended events engine. In a previous post (Option Trading: Getting the most out of the event session options) I explained that we use a set of buffers to store the event data before  we write the event data to asynchronous targets. The MAX_MEMORY along with the MEMORY_PARTITION_MODE defines how big each buffer will be. Theoretically, that means that I can predict the size of each buffer using the following formula: max memory / # of buffers = buffer size If it was that simple I wouldn’t be writing this post. I’ll take “boundary” for 64K Alex For a number of reasons that are beyond the scope of this blog, we create event buffers in 64K chunks. The result of this is that the buffer size indicated by the formula above is rounded up to the next 64K boundary and that is the size used to create the buffers. If you think visually, this means that the graph of your max_memory option compared to the actual buffer size that results will look like a set of stairs rather than a smooth line. You can see this behavior by looking at the output of dm_xe_sessions, specifically the fields related to the buffer sizes, over a range of different memory inputs: Note: This test was run on a 2 core machine using per_cpu partitioning which results in 5 buffers. (Seem my previous post referenced above for the math behind buffer count.) input_memory_kb total_regular_buffers regular_buffer_size total_buffer_size 637 5 130867 654335 638 5 130867 654335 639 5 130867 654335 640 5 196403 982015 641 5 196403 982015 642 5 196403 982015 This is just a segment of the results that shows one of the “jumps” between the buffer boundary at 639 KB and 640 KB. You can verify the size boundary by doing the math on the regular_buffer_size field, which is returned in bytes: 196403 – 130867 = 65536 bytes 65536 / 1024 = 64 KB The relationship between the input for max_memory and when the regular_buffer_size is going to jump from one 64K boundary to the next is going to change based on the number of buffers being created. The number of buffers is dependent on the partition mode you choose. If you choose any partition mode other than NONE, the number of buffers will depend on your hardware configuration. (Again, see the earlier post referenced above.) With the default partition mode of none, you always get three buffers, regardless of machine configuration, so I generated a “range table” for max_memory settings between 1 KB and 4096 KB as an example. start_memory_range_kb end_memory_range_kb total_regular_buffers regular_buffer_size total_buffer_size 1 191 NULL NULL NULL 192 383 3 130867 392601 384 575 3 196403 589209 576 767 3 261939 785817 768 959 3 327475 982425 960 1151 3 393011 1179033 1152 1343 3 458547 1375641 1344 1535 3 524083 1572249 1536 1727 3 589619 1768857 1728 1919 3 655155 1965465 1920 2111 3 720691 2162073 2112 2303 3 786227 2358681 2304 2495 3 851763 2555289 2496 2687 3 917299 2751897 2688 2879 3 982835 2948505 2880 3071 3 1048371 3145113 3072 3263 3 1113907 3341721 3264 3455 3 1179443 3538329 3456 3647 3 1244979 3734937 3648 3839 3 1310515 3931545 3840 4031 3 1376051 4128153 4032 4096 3 1441587 4324761 As you can see, there are 21 “steps” within this range and max_memory values below 192 KB fall below the 64K per buffer limit so they generate an error when you attempt to specify them. Max approximates True as memory approaches 64K The upshot of this is that the max_memory option does not imply a contract for the maximum memory that will be used for the session buffers (Those of you who read Take it to the Max (and beyond) know that max_memory is really only referring to the event session buffer memory.) but is more of an estimate of total buffer size to the nearest higher multiple of 64K times the number of buffers you have. The maximum delta between your initial max_memory setting and the true total buffer size occurs right after you break through a 64K boundary, for example if you set max_memory = 576 KB (see the green line in the table), your actual buffer size will be closer to 767 KB in a non-partitioned event session. You get “stepped up” for every 191 KB block of initial max_memory which isn’t likely to cause a problem for most machines. Things get more interesting when you consider a partitioned event session on a computer that has a large number of logical CPUs or NUMA nodes. Since each buffer gets “stepped up” when you break a boundary, the delta can get much larger because it’s multiplied by the number of buffers. For example, a machine with 64 logical CPUs will have 160 buffers using per_cpu partitioning or if you have 8 NUMA nodes configured on that machine you would have 24 buffers when using per_node. If you’ve just broken through a 64K boundary and get “stepped up” to the next buffer size you’ll end up with total buffer size approximately 10240 KB and 1536 KB respectively (64K * # of buffers) larger than max_memory value you might think you’re getting. Using per_cpu partitioning on large machine has the most impact because of the large number of buffers created. If the amount of memory being used by your system within these ranges is important to you then this is something worth paying attention to and considering when you configure your event sessions. The DMV dm_xe_sessions is the tool to use to identify the exact buffer size for your sessions. In addition to the regular buffers (read: event session buffers) you’ll also see the details for large buffers if you have configured MAX_EVENT_SIZE. The “buffer steps” for any given hardware configuration should be static within each partition mode so if you want to have a handy reference available when you configure your event sessions you can use the following code to generate a range table similar to the one above that is applicable for your specific machine and chosen partition mode. DECLARE @buf_size_output table (input_memory_kb bigint, total_regular_buffers bigint, regular_buffer_size bigint, total_buffer_size bigint) DECLARE @buf_size int, @part_mode varchar(8) SET @buf_size = 1 -- Set to the begining of your max_memory range (KB) SET @part_mode = 'per_cpu' -- Set to the partition mode for the table you want to generate WHILE @buf_size <= 4096 -- Set to the end of your max_memory range (KB) BEGIN     BEGIN TRY         IF EXISTS (SELECT * from sys.server_event_sessions WHERE name = 'buffer_size_test')             DROP EVENT SESSION buffer_size_test ON SERVER         DECLARE @session nvarchar(max)         SET @session = 'create event session buffer_size_test on server                         add event sql_statement_completed                         add target ring_buffer                         with (max_memory = ' + CAST(@buf_size as nvarchar(4)) + ' KB, memory_partition_mode = ' + @part_mode + ')'         EXEC sp_executesql @session         SET @session = 'alter event session buffer_size_test on server                         state = start'         EXEC sp_executesql @session         INSERT @buf_size_output (input_memory_kb, total_regular_buffers, regular_buffer_size, total_buffer_size)             SELECT @buf_size, total_regular_buffers, regular_buffer_size, total_buffer_size FROM sys.dm_xe_sessions WHERE name = 'buffer_size_test'     END TRY     BEGIN CATCH         INSERT @buf_size_output (input_memory_kb)             SELECT @buf_size     END CATCH     SET @buf_size = @buf_size + 1 END DROP EVENT SESSION buffer_size_test ON SERVER SELECT MIN(input_memory_kb) start_memory_range_kb, MAX(input_memory_kb) end_memory_range_kb, total_regular_buffers, regular_buffer_size, total_buffer_size from @buf_size_output group by total_regular_buffers, regular_buffer_size, total_buffer_size Thanks to Jonathan for an interesting question and a chance to explore some of the details of Extended Event internals. - Mike

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >