Search Results

Search found 88041 results on 3522 pages for 'ef4 code only'.

Page 18/3522 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Circular Reference exception with JSON Serialisation with MVC3 and EF4 CTP5w

    - by nakchak
    Hi I'm having problems with a circular reference when i try and serialise an object returned via EF4 CTP5. Im using the code first approach and simple poco's for my model. I have added [ScriptIgnore] attributes to any properties that provide a back references to an object and annoyingly every seems to work fine if i manually instantiate the poco's, i.e. they serialise to JSON fine, and the scriptignore attribute is acknowledged. However when i try and serialise an object returned from the DAL i get the circular reference exception "A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.xxxx'" I have tried several ways of retreiving the data but they all get stuck with this error: public JsonResult GetTimeSlot(int id) { TimeSlotDao tsDao = new TimeSlotDao(); TimeSlot ts = tsDao.GetById(id); return Json(ts); } The method below works slightly better as rather than the timeslot dynamic proxied object causing the circular refference its the appointment object. public JsonResult GetTimeSlot(int id) { TimeSlotDao tsDao = new TimeSlotDao(); var ts = from t in tsDao.GetQueryable() where t.Id == id select new {t.Id, t.StartTime, t.Available, t.Appointment}; return Json(ts); } Any ideas or solutions to this problem? Update I would prefer to use the out of the box serialiser if possible although Json.Net via nuget is ok as an alternative i would hope its possible to use it as I intended as well...

    Read the article

  • EF4 POCO Not Updating Navigation Property On Save

    - by Gavin Draper
    I'm using EF4 with POCO objects the 2 tables are as follows Service ServiceID, Name, StatusID Status StatusID, Name The POCO objects look like this Service ServiceID, Status, Name Status StatusID, Name With Status on the Service object being a Navigation Property and of type Status. In my Service Repository I have a save method that takes a service objects attaches it to the context and calls save. This works fine for the service, but if the status for that service has been changed it does not get updated. My Save method looks like this public static void SaveService(Service service) { using (var ctx = Context.CreateContext()) { ctx.AttachModify("Services", service); ctx.AttachTo("Statuses",service.Status); ctx.SaveChanges(); } } The AttachModify method attaches an object to the context and sets it to modified it looks like this public void AttachModify(string entitySetName, object entity) { if (entity != null) { AttachTo(entitySetName, entity); SetModified(entity); } } public void SetModified(object entity) { ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); } If I look at a SQL profile its not even including the navigation property in the update for the service table, it never touches the StatusID. Its driving me crazy. Any idea what I need to do to force the Navigation Property to update?

    Read the article

  • Beginner Question on traversing a EF4 model

    - by user564577
    I have a basic EF4 model with two entities. I'm using Self Tracking Entities Client has ClientAddresses relationship on clientkey = clientkey. (1 to many) How do i get a list/collection of client entities (STE) and their addresses (STE) but only ones where they live in a particular state or some such filter on the address??? This seems to filter and bring back clients but doesnt bring back addresses. var j = from client in context.Clients where client.ClientAddresses.All(c => c.ZIP == "80923") select client; I cant get this to create the Addresses because ClientAddresses is IEnumerable and it needs a TrackableCollection var query = from t1 in context.Clients join t2 in context.ClientAddresses on t1.ClientKey equals t2.ClientKey where t2.ZIP == "80923" select new Client { FirstName = t1.FirstName, LastName = t1.LastName, IsEnabled = t1.IsEnabled, ClientKey = t1.ClientKey, ChangeUser = t1.ChangeUser, ChangeDate = t1.ChangeDate, ClientAddresses = from a in t1.ClientAddresses select new ClientAddress { AddressKey = a.AddressKey, AddressLine1 = a.AddressLine1, AddressLine2 = a.AddressLine2, AddressTypeCode = a.AddressTypeCode, City = a.City, ClientKey = a.ClientKey, State = a.State, ZIP = a.ZIP } }; Any pointers would be appreciated. Thanks Edit: This seems to work.... var j = from client in context.Clients.Include("ClientAddresses") where client.ClientAddresses.Any(c => c.ZIP == "80923") select client;

    Read the article

  • Unable to delete inherited entity class in EF4

    - by Coding Gorilla
    I have two entities in an EF4 model (using Model First), let's call them EntityA and EntityB. EntityA is marked as abstract, and EntityB inherits from EntityA. They are similar to the following: public class EntityA { public Guid Id; public string Name; public string Uri; } public class EntityB : EntityA { public string AnotherProperty; } The generated database tables look as I would expect them, with EntityA as on table, and then another table like: EntityA_EntityB Id (PK, FK, uniqueidentifier) AnotherProperty (varchar) There is a foreign key constraint on EntityA_EntityB that references EntityA's Id property, no cascades are configured (although I did try changing these myself). The problem is that when I attempt to do something like: Context.DeleteObject(EntityA_EntityB); EF attempts to delete the EntityA_EntityB table record before deleting the EntityA table record, which of course violates the foreign key constraint on EntityA_EntityB table. Using EFProfiler I see the following commands being sent to the database: delete [dbo].[EntityA_EntityB] where (([Id] = '5c02899f-09ea-2ed9-d44b-01aef80f6b64' /* @0 */) followed by delete [dbo].[EntityA] where ([Id] = '5c02899f-09ea-2ed9-d44b-01aef80f6b64' /* @0 */) I'm completely stumped as to how to get around this problem. I would think the EF should know that it needs to delete the base class first, before deleting the inherited class. I know I could do some triggers or other database type solutions, but I'd rather avoid doing that if I can. All my classes are POCO built using some customized T4 templates. I don't want to paste in a lot of extraneous code, but if you need more information I'll provide what I can.

    Read the article

  • Cannot perform an ORDERBY against my EF4 data

    - by Jaxidian
    I have a query hitting EF4 using STEs and I'm having an issue with user-defined sorting. In debugging this, I have removed the dynamic sorting and am hard-coding it and I still have the issue. If I swap/uncomment the var results = xxx lines in GetMyBusinesses(), my results are not sorted any differently - they are always sorting it ascendingly. FYI, Name is a varchar(200) field in SQL 2008 on my Business table. private IQueryable<Business> GetMyBusinesses(MyDBContext CurrentContext) { var myBusinesses = from a in CurrentContext.A join f in CurrentContext.F on a.FID equals f.id join b in CurrentContext.Businesses on f.BID equals b.id where a.PersonID == 52 select b; var results = from r in myBusinesses orderby "Name" ascending select r; //var results = from r in results // orderby "Name" descending // select r; return results; } private PartialEntitiesList<Business> DoStuff() { var myBusinesses = GetMyBusinesses(); var myBusinessesCount = GetMyBusinesses().Count(); Results = new PartialEntitiesList<Business>(myBusinesses.Skip((PageNumber - 1)*PageSize).Take(PageSize).ToList()) {UnpartialTotalCount = myBusinessesCount}; return Results; } public class PartialEntitiesList<T> : List<T> { public PartialEntitiesList() { } public PartialEntitiesList(int capacity) : base(capacity) { } public PartialEntitiesList(IEnumerable<T> collection) : base(collection) { } public int UnpartialTotalCount { get; set; } }

    Read the article

  • Code is not the best way to draw

    - by Bertrand Le Roy
    It should be quite obvious: drawing requires constant visual feedback. Why is it then that we still draw with code in so many situations? Of course it’s because the low-level APIs always come first, and design tools are built after and on top of those. Existing design tools also don’t typically include complex UI elements such as buttons. When we launched our Touch Display module for Netduino Go!, we naturally built APIs that made it easy to draw on the screen from code, but very soon, we felt the limitations and tedium of drawing in code. In particular, any modification requires a modification of the code, followed by compilation and deployment. When trying to set-up buttons at pixel precision, the process is not optimal. On the other hand, code is irreplaceable as a way to automate repetitive tasks. While tools like Illustrator have ways to repeat graphical elements, they do so in a way that is a little alien and counter-intuitive to my developer mind. From these reflections, I knew that I wanted a design tool that would be structurally code-centric but that would still enable immediate feedback and mouse adjustments. While thinking about the best way to achieve this goal, I saw this fantastic video by Bret Victor: The key to the magic in all these demos is permanent execution of the code being edited. Whenever a parameter is being modified, everything is re-executed immediately so that the impact of the modification is instantaneously visible. If you do this all the time, the code and the result of its execution fuse in the mind of the user into dual representations of a single object. All mental barriers disappear. It’s like magic. The tool I built, Nutshell, is just another implementation of this principle. It manipulates a list of graphical operations on the screen. Each operation has a nice editor, and translates into a bit of code. Any modification to the parameters of the operation will modify the bit of generated code and trigger a re-execution of the whole program. This happens so fast that it feels like the drawing reacts instantaneously to all changes. The order of the operations is also the order in which the code gets executed. So if you want to bring objects to the front, move them down in the list, and up if you want to move them to the back: But where it gets really fun is when you start applying code constructs such as loops to the design tool. The elements that you put inside of a loop can use the loop counter in expressions, enabling crazy scenarios while retaining the real-time edition features. When you’re done building, you can just deploy the code to the device and see it run in its native environment: This works thanks to two code generators. The first code generator is building JavaScript that is executed in the browser to build the canvas view in the web page hosting the tool. The second code generator is building the C# code that will run on the Netduino Go! microcontroller and that will drive the display module. The possibilities are fascinating, even if you don’t care about driving small touch screens from microcontrollers: it is now possible, within a reasonable budget, to build specialized design tools for very vertical applications. Direct feedback is a powerful ally in many domains. Code generation driven by visual designers has become more approachable than ever thanks to extraordinary JavaScript libraries and to the powerful development platform that modern browsers provide. I encourage you to tinker with Nutshell and let it open your eyes to new possibilities that you may not have considered before. It’s open source. And of course, my company, Nwazet, can help you develop your own custom browser-based direct feedback design tools. This is real visual programming…

    Read the article

  • C# code generator

    - by Neir0
    Can someone recommend a simple c# code generator. I just looking something with methods like: GenClass = CreateNewClass(AccessModifier,Name......) GenClass.Add(new Method(AccessModifier,RetType,Name....){code=@"....."} GenClass.Add(new Property(AccessModifier,Type, Name....) ........... etc and after creating all classes\methods and other members we call Code Generation function(where we can specific some parametrs) Is there such opensource code generator?

    Read the article

  • Java 5 to Java 1.4 Source Code Backporting Tool

    - by kolrie
    Is there a tool that, given a Java 5 level source code, will backport it to Java 1.4-compliant source code, by removing Generics declarations, transforming for eachs in simple fors or iteration fors, etc.? Please note that I am looking for a tool that translates source code to source code, not class binaries.

    Read the article

  • Visual Studio - Attach Source Code to Reference

    - by Joe
    My C# project references a third-party DLL for which I have the source code. Can I somehow tell Visual Studio the location of that source code, so that, for example, when I press F12 to open the definition of a method in the DLL, it will open up the source code, instead of opening up the "Class [from metadata]" stub code?

    Read the article

  • Host a project on Github and Google Code

    - by Abhi Beckert
    Is it possible to have a project hosted on Github and google code? I've been using Google Code for years, and recently started playing with GitHub. I like GitHub a lot, but there's also a long list of Google Code features I really miss. Is it possible/feasible to host a single project on both? Can I use github as the primary repository for my source, but have all revisions automatically sent over to a git repository on Google Code?

    Read the article

  • Android: how to share code between projects signed with the same certificate

    - by tomash
    In Android documentation concerning code signing we can read: "By signing multiple applications with the same certificate and using signature-based permissions checks, your applications can share code and data in a secure manner." How exactly such code sharing can be done? Is it possible to release main application and multiple exchangeable plugins then discover them at runtime? What does source code looks like and what are advantages over "standard" intents calls from/to different APK packages?

    Read the article

  • Google Code + SVN or GitHub + Git

    - by Nazgulled
    Let me start by telling you that I never used anything besides SVN and I'm also a Windows user. I have a couple of simple projects that are open-source, others are on there way when I'm happy enough to release their source code but either way, I was thinking of using Google Code and SVN to share the source code of my projects instead of providing a link to the source on my website. This as always been a pain cause I had to update the binaries and the code every time I released a new version. This would also help me out to have a backup of my code some where instead of just my local machine (I used to have a local Subversion server running). What I want from a service like this is very simple... I just want a place to store my source code that people can download if they want, allows me to control revisions and provide a simple and easy issue system so people can submit bugs and stuff like that. I guess both of them have this. But I don't want to host any binaries in their websites, I want this to be hosted on my website so I can control download statistics with my own scripts, I also don't have the need for wiki pages as I prefer to have all the documentation in my own website. Does anyone of this services provide a way to "disable" features like wiki and downloads and don't show them at all for my project(s)? Now, I'm sure there are lots of pros and cons about using Google Code with SVN and GitHub with Git (of course) but here's what it's important for me on each one and why I like them: Google Code: As with any Google page, the complexity is almost non-existent Everyone (or almost) as a Google account and this is nice if people want to report problems using the issues system GitHub: May (or may not) be a little more complex (not a problem for me though) than Google's pages but... ...has a much prettier interface than Google's service It needs people to be registered on GitHub to post about issues I like the fact that with Git, you have your own revisions locally (can I use TortoiseGit for this or?) Basically that's it, not much I know... What other, most common, pros and cons can you tell me about each site/software? Keep in mind that my projects are simple, I'm probably the only one who will ever develop these projects on these repositories (or maybe not, for now I will)

    Read the article

  • must have tools for better quality code

    - by leon
    I just started my real development career and I want to know what set of tools/strategy that the community is using to write better quality code. To start, I use astyle to format my code doxygen to document my code gcc -Wall -Wextra -pedantic and clang -Wall -Wextra -pedantic to check all warnings What tools/strategy do you use to write better code? This question is open to all language and all platform.

    Read the article

  • Re-generate Code Gen Files in Visual Studio

    - by dev.e.loper
    I'm using Visual Studio 2008. I've added a control on a page but can't reference it in code-behind file. When I looked at the Code-Gen file, I didn't find my new control. It looks like Visual Studio didn't update Code Gen file to include my control. Is there a way to manually re-generate that Code Gen file?

    Read the article

  • Formatting PHP Code within Vim

    - by gacrux
    I'm currently using Vim as a lightweight IDE. I have NERDTree, bufexplorer, supertab, and ctags plugins which do almost everything I want. Only big thing missing for me is auto code formatting. I'm working with some messy PHP code which has inconsistent indenting and code formatting, ideally I could highlight the code I want formatted (whole files would be fine too) and run a command to tidy it. Does anybody have a nice solution for this working in Vim?

    Read the article

  • Pluralsight Meet the Author Podcast on Structuring JavaScript Code

    - by dwahlin
    I had the opportunity to talk with Fritz Onion from Pluralsight about one of my recent courses titled Structuring JavaScript Code for one of their Meet the Author podcasts. We talked about why JavaScript patterns are important for building more re-useable and maintainable apps, pros and cons of different patterns, and how to go about picking a pattern as a project is started. The course provides a solid walk-through of converting what I call “Function Spaghetti Code” into more modular code that’s easier to maintain, more re-useable, and less susceptible to naming conflicts. Patterns covered in the course include the Prototype Pattern, Revealing Module Pattern, and Revealing Prototype Pattern along with several other tips and techniques that can be used. Meet the Author:  Dan Wahlin on Structuring JavaScript Code   The transcript from the podcast is shown below: [Fritz]  Hello, this is Fritz Onion with another Pluralsight author interview. Today we’re talking with Dan Wahlin about his new course, Structuring JavaScript Code. Hi, Dan, it’s good to have you with us today. [Dan]  Thanks for having me, Fritz. [Fritz]  So, Dan, your new course, which came out in December of 2011 called Structuring JavaScript Code, goes into several patterns of usage in JavaScript as well as ways of organizing your code and what struck me about it was all the different techniques you described for encapsulating your code. I was wondering if you could give us just a little insight into what your motivation was for creating this course and sort of why you decided to write it and record it. [Dan]  Sure. So, I got started with JavaScript back in the mid 90s. In fact, back in the days when browsers that most people haven’t heard of were out and we had JavaScript but it wasn’t great. I was on a project in the late 90s that was heavy, heavy JavaScript and we pretty much did what I call in the course function spaghetti code where you just have function after function, there’s no rhyme or reason to how those functions are structured, they just kind of flow and it’s a little bit hard to do maintenance on it, you really don’t get a lot of reuse as far as from an object perspective. And so coming from an object-oriented background in JAVA and C#, I wanted to put something together that highlighted kind of the new way if you will of writing JavaScript because most people start out just writing functions and there’s nothing with that, it works, but it’s definitely not a real reusable solution. So the course is really all about how to move from just kind of function after function after function to the world of more encapsulated code and more reusable and hopefully better maintenance in the process. [Fritz]  So I am sure a lot of people have had similar experiences with their JavaScript code and will be looking forward to seeing what types of patterns you’ve put forth. Now, a couple I noticed in your course one is you start off with the prototype pattern. Do you want to describe sort of what problem that solves and how you go about using it within JavaScript? [Dan]  Sure. So, the patterns that are covered such as the prototype pattern and the revealing module pattern just as two examples, you know, show these kind of three things that I harp on throughout the course of encapsulation, better maintenance, reuse, those types of things. The prototype pattern specifically though has a couple kind of pros over some of the other patterns and that is the ability to extend your code without touching source code and what I mean by that is let’s say you’re writing a library that you know either other teammates or other people just out there on the Internet in general are going to be using. With the prototype pattern, you can actually write your code in such a way that we’re leveraging the JavaScript property and by doing that now you can extend my code that I wrote without touching my source code script or you can even override my code and perform some new functionality. Again, without touching my code.  And so you get kind of the benefit of the almost like inheritance or overriding in object oriented languages with this prototype pattern and it makes it kind of attractive that way definitely from a maintenance standpoint because, you know, you don’t want to modify a script I wrote because I might roll out version 2 and now you’d have to track where you change things and it gets a little tricky. So with this you just override those pieces or extend them and get that functionality and that’s kind of some of the benefits that that pattern offers out of the box. [Fritz]  And then the revealing module pattern, how does that differ from the prototype pattern and what problem does that solve differently? [Dan]  Yeah, so the prototype pattern and there’s another one that’s kind of really closely lined with revealing module pattern called the revealing prototype pattern and it also uses the prototype key word but it’s very similar to the one you just asked about the revealing module pattern. [Fritz]  Okay. [Dan]  This is a really popular one out there. In fact, we did a project for Microsoft that was very, very heavy JavaScript. It was an HMTL5 jQuery type app and we use this pattern for most of the structure if you will for the JavaScript code and what it does in a nutshell is allows you to get that encapsulation so you have really a single function wrapper that wraps all your other child functions but it gives you the ability to do public versus private members and this is kind of a sort of debate out there on the web. Some people feel that all JavaScript code should just be directly accessible and others kind of like to be able to hide their, truly their private stuff and a lot of people do that. You just put an underscore in front of your field or your variable name or your function name and that kind of is the defacto way to say hey, this is private. With the revealing module pattern you can do the equivalent of what objective oriented languages do and actually have private members that you literally can’t get to as an external consumer of the JavaScript code and then you can expose only those members that you want to be public. Now, you don’t get the benefit though of the prototype feature, which is I can’t easily extend the revealing module pattern type code if you don’t like something I’m doing, chances are you’re probably going to have to tweak my code to fix that because we’re not leveraging prototyping but in situations where you’re writing apps that are very specific to a given target app, you know, it’s not a library, it’s not going to be used in other apps all over the place, it’s a pattern I actually like a lot, it’s very simple to get going and then if you do like that public/private feature, it’s available to you. [Fritz]  Yeah, that’s interesting. So it’s almost, you can either go private by convention just by using a standard naming convention or you can actually enforce it by using the prototype pattern. [Dan]  Yeah, that’s exactly right. [Fritz]  So one of the things that I know I run across in JavaScript and I’m curious to get your take on is we do have all these different techniques of encapsulation and each one is really quite different when you’re using closures versus simply, you know, referencing member variables and adding them to your objects that the syntax changes with each pattern and the usage changes. So what would you recommend for people starting out in a brand new JavaScript project? Should they all sort of decide beforehand on what patterns they’re going to stick to or do you change it based on what part of the library you’re working on? I know that’s one of the points of confusion in this space. [Dan]  Yeah, it’s a great question. In fact, I just had a company ask me about that. So which one do I pick and, of course, there’s not one answer fits all. [Fritz]  Right. [Dan]  So it really depends what you just said is absolutely in my opinion correct, which is I think as a, especially if you’re on a team or even if you’re just an individual a team of one, you should go through and pick out which pattern for this particular project you think is best. Now if it were me, here’s kind of the way I think of it. If I were writing a let’s say base library that several web apps are going to use or even one, but I know that there’s going to be some pieces that I’m not really sure on right now as I’m writing I and I know people might want to hook in that and have some better extension points, then I would look at either the prototype pattern or the revealing prototype. Now, really just a real quick summation between the two the revealing prototype also gives you that public/private stuff like the revealing module pattern does whereas the prototype pattern does not but both of the prototype patterns do give you the benefit of that extension or that hook capability. So, if I were writing a library that I need people to override things or I’m not even sure what I need them to override, I want them to have that option, I’d probably pick a prototype, one of the prototype patterns. If I’m writing some code that is very unique to the app and it’s kind of a one off for this app which is what I think a lot of people are kind of in that mode as writing custom apps for customers, then my personal preference is the revealing module pattern you could always go with the module pattern as well which is very close but I think the revealing module patterns a little bit cleaner and we go through that in the course and explain kind of the syntax there and the differences. [Fritz]  Great, that makes a lot of sense. [Fritz]  I appreciate you taking the time, Dan, and I hope everyone takes a chance to look at your course and sort of make these decisions for themselves in their next JavaScript project. Dan’s course is, Structuring JavaScript Code and it’s available now in the Pluralsight Library. So, thank you very much, Dan. [Dan]  Thanks for having me again.

    Read the article

  • Is using MultiMaps code smell? If so what alternative data structures fit my needs?

    - by Pureferret
    I'm trying to model nWoD characters for a roleplaying game in a character builder program. The crux is I want to support saving too and loading from yaml documents. One aspect of the character's is their set of skills. Skills are split between exactly three 'types': Mental, Physical, and Social. Each type has a list of skills under if. My Yaml looks like this: PHYSICAL: Athletics: 0 Brawl: 3 MENTAL: Academics: 2 Computers My initial thought was to use a Multimap of some sort, and have the skill type as an Enum, and key to my map. Each Skill is an element in the collection that backs the multimap. However, I've been struggling to get the yaml to work. On explaining this to a colleague outside of work they said this was probably a sign of code smell, and he's never seen it used 'well'. Are multiMaps really code smell? If so what alternate data structures would suit my goals?

    Read the article

  • How do I encrypt the source code on the webserver?

    - by Ashin k n
    I have a web application developed using Python, HTML, CSS & JavaScript. The customer installs it in any of their own Machine and uses it through their LAN. In short the customer sets up the webserver in any of their own machine. Since its a web application, all the source code is open for the customer in the document root directory of webserver. I want to encrypt the whole source code in the document root directory in such a way that it should not effect the working of the web application. Is there is any way to encrypt the Python, HTML, CSS & JavaScript for this purpose.

    Read the article

  • Best practices for managing deployment of code from dev to production servers?

    - by crosenblum
    I am hoping to find an easy tool or method, that allow's managing our code deployment. Here are the features I hope this solution has: Either web-based or batch file, that given a list of files, will communicate to our production server, to backup those files in different folders, and zip them and put them in a backup code folder. Then it records the name, date/time, and purpose of the deployment. Then it sends the files to their proper spot on the production server. I don't want too complex an interface to doing the deployment's because then they might never use it. Or is what I am asking for too unrealistic? I just know that my self-discipline isn't perfect, and I'd rather have a tool I can rely on to do what needs to be done, then my own memory of what exact steps I have to take every time. How do you guys, make sure everything get's deployed correctly, and have easy rollback in case of any mistakes?

    Read the article

  • How to understand Linux kernel source code for a beginner?

    - by Amit Chavan
    Hi, I am a student interested in working on Memory Management, particularly the page replacement component of the linux kernel. What are the different guides that can help me to begin understanding the kernel source? I have tried to read the book Understanding the Linux Virutal Memory Manager by Mel Gorman and Understanding the Linux Kernel by Cesati and Bovet, but they do not explain the flow of control through the code. They only end up explaining various data structures used and the work various functions perform. This makes the code more confusing. My project deals with tweaking the page replacement algorithm in a mainstream kernel and analyse its performance for a set of workloads. Is there a flavor of the linux kernel that would be easier to understand(if not the linux-2.6.xx kernel)?

    Read the article

  • What if you don't have code samples to give a prospective employer?

    - by lucks
    What do you do when you don't have any good code samples available when asked by a prospective employer? I like to consider myself a fairly capable developer but I can't share any of the software I've been writing for my company the last few years. Unfortunately, I haven't been able to find the time to put much work in my personal projects either. Basically, I don't think I can find any code samples that are a good representative of my skills that I can share. Any ideas? Thanks in advance.

    Read the article

  • C: What is a good source to teach standard/basic code conventions to someone newly learning the language ?

    - by shan23
    I'm tutoring someone who can be described as a rank newcomer in C. Understandably, she does not know much about coding conventions generally practiced, and hence all her programs tend to use single letter vars, mismatched spacing/indentation and the like, making it very difficult to read/debug her endeavors. My question is, is there a link/set of guidelines and examples which she can use for adopting basic code conventions ? It should not be too arcane as to scare her off, yet inclusive enough to have the basics covered (so that no one woulc wince looking at the code). Any suggestions ?

    Read the article

  • What is the politically correct way of refactoring other's code?

    - by dukeofgaming
    I'm currently working in a geographically distributed team in a big company. Everybody is just focused on today's tasks and getting things done, however this means sometimes things have to be done the quick way, and that causes problems... you know, same old, same old. I'm bumping into code with several smells such as: big functions pointless utility functions/methods (essentially just to save writing a word), overcomplicated algorithms, extremely big files that should be broken down into different files/classes (1,500+ lines), etc. What would be the best way of improving code without making other developers feel bad/wrong about any proposed improvements?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >