Search Results

Search found 27766 results on 1111 pages for 'bad idea jeans'.

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

  • Are long methods always bad?

    - by wobbily_col
    So looking around earlier I noticed some comments about long methods being bad practice. I am not sure I always agree that long methods are bad (and would like opinions from others). For example I have some Django views that do a bit of processing of the objects before sending them to the view, a long method being 350 lines of code. I have my code written so that it deals with the paramaters - sorting / filtering the queryset, then bit by bit does some processing on the objects my query has returned. So the processing is mainly conditional aggregation, that has complex enough rules it can't easily be done in the database, so I have some variables declared outside the main loop then get altered during the loop. varaible_1 = 0 variable_2 = 0 for object in queryset : if object.condition_condition_a and variable_2 > 0 : variable 1+= 1 ..... ... . more conditions to alter the variables return queryset, and context So according to the theory I should factor out all the code into smaller methods, so That I have the view method as being maximum one page long. However having worked on various code bases in the past, I sometimes find it makes the code less readable, when you need to constantly jump from one method to the next figuring out all the parts of it, while keeping the outermost method in your head. I find that having a long method that is well formatted, you can see the logic more easily, as it isn't getting hidden away in inner methods. I could factor out the code into smaller methods, but often there is is an inner loop being used for two or three things, so it would result in more complex code, or methods that don't do one thing but two or three (alternatively I could repeat inner loops for each task, but then there will be a performance hit). So is there a case that long methods are not always bad? Is there always a case for writing methods, when they will only be used in one place?

    Read the article

  • When is a 'core' library a bad idea?

    - by Alex Angas
    When developing software, I often have a centralised 'core' library containing handy code that can be shared and referenced by different projects. Examples: a set of functions to manipulate strings commonly used regular expressions common deployment code However some of my colleagues seem to be turning away from this approach. They have concerns such as the maintenance overhead of retesting code used by many projects once a bug is fixed. Now I'm reconsidering when I should be doing this. What are the issues that make using a 'core' library a bad idea?

    Read the article

  • Child to Parent linking - bad idea?

    - by Thraka
    I have a situation where my parent knows about it's child (duh) but I want the child to be able to reference the parent. The reason for this is that I want the child to have the ability to designate itself as most important or least important when it feels like it. When the child does this, it moves it to the top or bottom of the parent's children. In the past I've used a WeakReference property on the child to refer back tot he parent, but I feel that adds an annoying overhead, but maybe it's just the best way to do it. Is this just a bad idea? How would you implement this ability differently?

    Read the article

  • Understanding 400 Bad Request Exception

    - by imran_ku07
        Introduction:          Why I am getting this exception? What is the cause of this error. Developers are always curious to know the root cause of an exception, even though they found the solution from elsewhere. So what is the reason of this exception (400 Bad Request).The answer is security. Security is an important feature for any application. ASP.NET try to his best to give you more secure application environment as possible. One important security feature is related to URLs. Because there are various ways a hacker can try to access server resource. Therefore it is important to make your application as secure as possible. Fortunately, ASP.NET provides this security by throwing an exception of Bad Request whenever he feels. In this Article I am try to present when ASP.NET feels to throw this exception. You will also see some new ASP.NET 4 features which gives developers some control on this situation.   Description:   http.sys Restrictions:           It is interesting to note that after deploying your application on windows server that runs IIS 6 or higher, the first receptionist of HTTP request is the kernel mode HTTP driver: http.sys. Therefore for completing your request successfully you need to present your validity to http.sys and must pass the http.sys restriction.           Every http request URL must not contain any character from ASCII range of 0x00 to 0x1F, because they are not printable. These characters are invalid because these are invalid URL characters as defined in RFC 2396 of the IETF. But a question may arise that how it is possible to send unprintable character. The answer is that when you send your request from your application in binary format.           Another restriction is on the size of the request. A request containg protocal, server name, headers, query string information and individual headers sent along with the request must not exceed 16KB. Also individual header should not exceed 16KB.           Any individual path segment (the portion of the URL that does not include protocol, server name, and query string, for example, http://a/b/c?d=e,  here the b and c are individual path) must not contain more than 260 characters. Also http.sys disallows URLs that have more than 255 path segments.           If any of the above rules are not follow then you will get 400 Bad Request Exception. The reason for this restriction is due to hack attacks against web servers involve encoding the URL with different character representations.           You can change the default behavior enforced by http.sys using some Registry switches present at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters    ASP.NET Restrictions:           After passing the restrictions enforced by the kernel mode http.sys then the request is handed off to IIS and then to ASP.NET engine and then again request has to pass some restriction from ASP.NET in order to complete it successfully.           ASP.NET only allows URL path lengths to 260 characters(only paths, for example http://a/b/c/d, here path is from a to d). This means that if you have long paths containing 261 characters then you will get the Bad Request exception. This is due to NTFS file-path limit.           Another restriction is that which characters can be used in URL path portion.You can use any characters except some characters because they are called invalid characters in path. Here are some of these invalid character in the path portion of a URL, <,>,*,%,&,:,\,?. For confirming this just right click on your Solution Explorer and Add New Folder and name this File to any of the above character, you will get the message. Files or folders cannot be empty strings nor they contain only '.' or have any of the following characters.....            For checking the above situation i have created a Web Application and put Default.aspx inside A%A folder (created from windows explorer), then navigate to, http://localhost:1234/A%25A/Default.aspx, what i get response from server is the Bad Request exception. The reason is that %25 is the % character which is invalid URL path character in ASP.NET. However you can use these characters in query string.           The reason for these restrictions are due to security, for example with the help of % you can double encode the URL path portion and : is used to get some specific resource from server.   New ASP.NET 4 Features:           It is worth to discuss the new ASP.NET 4 features that provides some control in the hand of developer. Previously we are restricted to 260 characters path length and restricted to not use some of characters, means these characters cannot become the part of the URL path segment.           You can configure maxRequestPathLength and maxQueryStringLength to allow longer or shorter paths and query strings. You can also customize set of invalid character using requestPathInvalidChars, under httpruntime element. This may be the good news for someone who needs to use some above character in their application which was invalid in previous versions. You can find further detail about new ASP.NET features about URL at here           Note that the above new ASP.NET settings will not effect http.sys. This means that you have pass the restriction of http.sys before ASP.NET ever come in to the action. Note also that previous restriction of http.sys is applied on individual path and maxRequestPathLength is applied on the complete path (the portion of the URL that does not include protocol, server name, and query string). For example, if URL is http://a/b/c/d?e=f, then maxRequestPathLength will takes, a/b/c/d, into account while http.sys will take a, b, c individually.   Summary:           Hopefully this will helps you to know how some of initial security features comes in to play, but i also recommend that you should read (at least first chapter called Initial Phases of a Web Request of) Professional ASP.NET 2.0 Security, Membership, and Role Management by Stefan Schackow. This is really a nice book.

    Read the article

  • Unity 3D game idea for a fun and teaching game

    - by rasheeda
    I have been brainstorming for months now on writing a unity 3D game for my final year computer science project. I have been learning unity for sometime now but comming up with a concept is quite difficult than i thought. The game has to be really fun and also educational, one that the school and community can benefit from. I am thinking about a third person game. where the player runs round in an enviroment, picks up coins and earn points. This alone wouldn't earn me points and I have been trying to find new ideas of my own and all over the net but to no avail. Hopefully you guys can help me out with an idea, and how to make the lecturers appreciate the game and also make kids wanna play play it for a reason. Thanks.

    Read the article

  • A project idea for project ideas!?

    - by Auxiliary
    First take a look at this question which I asked a few months ago. I still can't find a place where programmers and computer specialists can discuss their projects and ideas. I found OpenHatch.com. It's good but not sufficient, it's only for open-source projects and is not really a place to discuss ideas. OK, so here's an idea, Why don't we make one? The question is do you think there is a need for such a social programmer's lounge? A place where they can discuss their ideas? Do you think it's worth the time and money to start such a website? Do you think it has the potential of getting enough traffic to keep it alive? Many thanks

    Read the article

  • Research idea in simulation

    - by Nilani Algiriyage
    Hi, I'm an undergraduate in University of Keleniya,Sri Lanka. I'm interested in doing a research on BPM, BPMN. But I have very few knowledgeable people and very few resources in my country. My supervisor also doesn't have enough knowledge in this area. So if you can please help me to find a research topic in BPM or BPMN. At least please help me to get an idea what areas I can do? Thank you very much. Regards, Nilani.

    Read the article

  • Opinion for my recruitment portal idea [closed]

    - by user1498503
    I am creating a recruitment portal for IT professionals. In this, recruiters while creating a job post would be asked to create a skills requirement matrix. Essential Skills : asp.net MVC Entity Framework Desired Skills : SQL Server 2008 IIS 7.0 On the other hand job seekers would also have their own skills matrix Jobseeker #1 Core Skills : asp.net MVC Entity Framework MangoDB Secondary Skills : SQL Server 2008 IIS 7.0 Jobseeker #2 Core Skills : asp.net Web forms Secondary Skills : SQL Server 2008 IIS 7.0 So when both job seekers apply for the same job. Would it be a good idea for both of them to see each other's skills matrix for comparison?Also no personal details and CVs are shared. I think comparisons would help job seekers to understand what their areas of improvement are and could motivate to fill the skills gap. Your opinion would be appreciated. Regards

    Read the article

  • (idea) Add Gubuntu (pure Gnome 3) to the list of Ubuntu Desktop Version

    - by squallbayu
    Ubuntu has announced his own 'shell' called unity. I myself have the idea that Ubuntu adds a new list for his desktop version with Gubuntu, a pure Gnome 3.0 on Ubuntu (just like Kubuntu). so the entire list of Ubuntu Natty tomorrow maybe like this : Ubuntu 10.04 (unity) Gubuntu 10:04 (pure Gnome 3.0) Kubuntu 10:04 Xubuntu 10:04 Lubuntu 10:04 Edubuntu 10.04 Ubuntu 10.04 Server Edition Actually, I myself prefer a version that looks like this : Ubuntu 10.04 Unity Edition Ubuntu 10.04 Gnome Edition Ubuntu 10.04 KDE Edition Ubuntu 10.04 XFCE Edition Ubuntu 10.04 LXDE Edition Ubuntu 10.04 Education Edition Ubuntu 10.04 Server Edition so, the name of Ubuntu will be more unified and more simple for all versions of Ubuntu. What do you think?

    Read the article

  • Expiring timed actions a good idea?

    - by Bart van Heukelom
    We have an online game where players sometimes have to wait a while (say 30 minutes) before a process they intiated completes. This encourages them to come back later. An example of this is growing crops in Farmville or basically any action in the Sims Play4Free. Now, however, there is the idea to let these processes expire, so if the player doesn't 'reap' them in time (e.g. within 4 hours) they are aborted. I'm a bit sceptical about this. How will this make players come back more often? Is not the reward of reaping the process enough for that? Can we expect players to fit their daily schedule around our game, maybe even set the alarm clock at night? Won't this just cause players to give up on starting these processes in the first place? I realise this may be too subjective for this site, so I'll end with a concrete question: Do (m)any other online free-to-play games employ this technique?

    Read the article

  • Results stored in a session - good idea?

    - by Nick
    To give a bit of background, lets say it's a generic results page, which is paginated so there are X results per page. Generally to do this, I have two queries on the page: to get the total number of results to get the results, limiting by the correct page's resultset However, recently I've been trying to cut down on the queries the site is making, and I thought one way to do this would be to only do the query if any parameters to the page have changed (except of course the page number)? This would then cache all the result id's in a session, which can be sliced when I need to return the correct resultset for that page. I was trying to look around the net to see if there are downsides of this method, but I've found very little information about it. Has anyone done this before? Is it a good idea?

    Read the article

  • How to fix: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

    - by ybbest
    Issue: Recently, I am having issues with deploying asp.net mvc 4 application to Windows Server 2008 R2.After add the necessary role and features and I setup an application in IIS. However , I received the following error message: PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list   Solution: It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the “Add Feature” dialog.   To fix this, I simply ran the following command at the command prompt %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i If I had been on a 32 bit system, it would have looked like the following: %windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe –i   References: http://stackoverflow.com/questions/6846544/how-to-fix-handler-pagehandlerfactory-integrated-has-a-bad-module-managedpip

    Read the article

  • Idea for a physics–computer science joint curriculum and textbook

    - by Ami
    (I apologize in advance if this question is off topic or too vague) I want to write (and have starting outlining) a physics textbook which assumes its reader is a competent computer programmer. Normal physics textbooks teach physical formulas and give problems that are solved with pen, paper and calculator. I want to provide a book that emphasizes computational physics, how computers can model physical systems and gives problems of the kind: write a program that can solve a set of physics problems based on user input. Third party open source libraries would be used to handle most of the computation and I want to use a high-level language like Java or C#. Besides the fact I'd enjoy working on this, I think a physics-computer science joint curriculum should be offered in schools and this is part of a large agenda to make this happen. I think physics students (like myself) should be learning how to use and leverage computers to solve abstract problems and sets of problems. I think programming languages should be thought of as a useful medium for engaging in many areas of inquiry. Is this an idea worth pursuing? Is the merger of these two subjects in the form of an undergraduate college curriculum feasible? Are there any specific tools I should be leveraging or pitfalls I should be aware of? Has anyone heard of college courses or otherwise that assume this methodology? Are there any books/textbooks out there like the one I'm describing (for physics or any other subject)?

    Read the article

  • My boss has a different idea of a website's UX [migrated]

    - by NicoJuicy
    Let me explain the situation. I started transforming a "old (.Net 2.0)" Application into a webapplication. Problem here is, that no-one here is really acquainted with the UX of a website (Simple, efficient). Eventhough, i still have to regard that the website can be tailored to a customer needs through parameters (yeah, i know :s ) For example: I wanted to have a layout similar to invoicemachine (= as simple as possible). -- He wants a Ribbon toolbar. Going to a supplier gives the list of supplier -- He wants to display the "Create Supplier" screen where you can use the wildcards in a certain textbox, to search for a specific Supplier and then give the list of the suppliers. Also, i need 4 search/filter mechanisms: people can search per field with wildmarks can filter the suppliers search a keyword through all the data of a supplier filter the "list Suppliers" page by the first letter of the name. LIST Suppliers | A | D | Z Adam Wrincle ADD |EDIT |Delete Damzel InDistress ADD |EDIT |Delete Zorro ADD |EDIT |Delete I can't seem to get through to him, that the UX of a website needs to be differently than a Windows Application. If he wants to bring all the logic of the windows app into a website, why letting me build a website then? Stick to the old solution. Am i mistaking so hard or how could i convince / show him that an online-solution is something different than the offline solution. He already "saw" online solutions of other applications to get an idea, but if i suggest something he won't listen (if it's GUI / UX related, that is).

    Read the article

  • Why is prefixing column names considered bad practice?

    - by P.Brian.Mackey
    According to a popular SO post is it considered a bad practice to prefix table names. At my company every column is prefixed by a table name. This is difficult for me to read. I'm not sure the reason, but this naming is actually the company standard. I can't stand the naming convention, but I have no documentation to back up my reasoning. All I know is that reading AdventureWorks is much simpler. In this our company DB you will see a table, Person and it might have column name: Person_First_Name or maybe even Person_Person_First_Name (don't ask me why you see person 2x) Why is it considered a bad practice to pre-fix column names? Are underscores considered evil in SQL as well? Note: I own Pro SQL Server 2008 - Relation Database design and implementation. References to that book are welcome.

    Read the article

  • Worst practices in C++, common mistakes ...

    - by Felix Dombek
    After reading this famous rant by Linus Torvalds, I wondered what actually are all the bad things programmers might do in C++. I'm explicitly not referring to typography errors or bad program flow as treated in this question and answers, but to more high-level errors which are not detected by the compiler and do not result in obvious bugs at first run, complete design errors, things which are improbable in C but are likely to be done by newcomers who don't understand the full implications of their code. I also welcome answers pointing out a huge performance decrease where it would not usually be expected. An example of what one of my professors once told me: You have used somewhat too many instances of unneeded inheritance and virtuality. Inheritance makes a design much more complicated (and inefficient because of the RTTI (run-time type inference) subsystem), and it should therefore only be used where it makes sense, e.g. for the actions in the parse table." [I wrote an LR(1) parser generator.] "Because you make intensive use of templates, you practically don't need inheritance."

    Read the article

  • Ideas for making money off a website

    - by bradenkeith
    I'm considering acquiring a website that traffics close to 20k a month. It's currently unprofitable, but obviously I would need to change that to justify the cost. It's a support site for a framework similar to CakePHP. A resource that allows people to find plugins for that site. How would you go about expanding this site so that it would be broad enough to raise traffic and how would you make money off of it? Some ideas I've had: 1- BuySellAds.com seem to make ads classy and relevant 2- Team up with other sites in some way (What ways? ... Ecommerce sites that sell plugins (like CodeCanyon), etc) 3- Write tutorials and such to drive more traffic (time consuming, and already heavily saturated for this framework). Are there resources out there that help webmasters in ways like this?

    Read the article

  • A project idea I've got...

    - by Mr Teeth
    Hi, Next year I will be doing a final year project at Uni. I've already thought of one and was wondering what you guys think of it. I want to create a University Information Search for prospective students who are trying to look for an affordable University to attend. It will depend on the student's family income and the grades they get. They enter in those two parameters (and some more) and it comes up with a list of suitable Unis based on their criteria. This is not about the price of tution fee. It's mostly to do with the cost of living. Stuff like: Rent (if living in a private flat). Student Accomadation. Cost of traveling to your home and back (for holidays). ...and some other stuff stuff I haven't thought about yet. It'll mostly be GUI driven with some textual information. I'm also thinking of using it as a website interface. What do you guys think? Can I program something like this Java? If there's any holes you see in my idea please tell me.

    Read the article

  • When to reply 400 Bad Request

    - by KajMagnus
    According to www.w3.org, a Web server should reply with status code 400 Bad Request if: "The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications" Does that mean only request that violates some HTTP spec? Or does it include a request that my particular Web app thinks is broken? When would you reply 400? For example, if my Web app expects a query string to always include a "function=..." parameter, would you reply code 400 Bad Request or 403 Forbidden? (403 means that "The server understood the request, but is refusing to fulfill it.")

    Read the article

  • How to learn PHP effectively?

    - by Goma
    A dozen of bad tutorials out there that teach you bad habits especially when we speak about PHP. I want to learn how to avoid the things that can lead me to develop inefficient web applications. I like to learn from videos but most videos I've found on the internet are provided by people who do not follow good practices. My second option is to learn from books but I did not find a good book for starters in PHP! It would be very helpful for me if you can tell me about your story in learning PHP, what are things that I should avoid? How to learn about PHP security from the beginning to avoid unlearn something later on?. Please provide links to books, websites that provide high quality video tutorials for PHP, and you tips for a good start!

    Read the article

  • Best practices for App Idea ownership and shares

    - by JOG
    I am developing apps on my sparetime. I am the sole developer, and two non-programmer friends of mine provide vision, content, algorithms and ideas. We always agree happily on all the features, todos and prioritizations. But naturally, coding it is the biggest part. When selling, we agree on splitting profit equally, that is 33% each. But version 1.0 naturally does not sell much. And I go on to try to make the app more viral. This includes tons of stuff where the others are of little help. Examples: Adding support for sharing, facebook connect, gameifying, letting users add content, home page, support, maintenance, server services to make it easier for to update content. The list is long. Suddenly I will be doing 100% of a lot of work but only "own" a third of the income. My friends may either "fade out" of the project after 1.0, or they continue to contribute, but with less value and I would rather exchange them for more programmers or graphic designers. The effort they made to version 1.0 is worth a lot to the app and I realize I would have never done it without them. But I am doing all the work in the end. It is hard to negotiate about splitting 90, 5, 5 instead of 33% each, because the idea is still theirs. How to solve this? What are the best practices to regard the ownership of the app? What kind of agreements could I make that make it beneficial and motivational for me to continue developing the app?

    Read the article

  • Why enumerator structs are a really bad idea

    - by Simon Cooper
    If you've ever poked around the .NET class libraries in Reflector, I'm sure you would have noticed that the generic collection classes all have implementations of their IEnumerator as a struct rather than a class. As you will see, this design decision has some rather unfortunate side effects... As is generally known in the .NET world, mutable structs are a Very Bad Idea; and there are several other blogs around explaining this (Eric Lippert's blog post explains the problem quite well). In the BCL, the generic collection enumerators are all mutable structs, as they need to keep track of where they are in the collection. This bit me quite hard when I was coding a wrapper around a LinkedList<int>.Enumerator. It boils down to this code: sealed class EnumeratorWrapper : IEnumerator<int> { private readonly LinkedList<int>.Enumerator m_Enumerator; public EnumeratorWrapper(LinkedList<int> linkedList) { m_Enumerator = linkedList.GetEnumerator(); } public int Current { get { return m_Enumerator.Current; } } object System.Collections.IEnumerator.Current { get { return Current; } } public bool MoveNext() { return m_Enumerator.MoveNext(); } public void Reset() { ((System.Collections.IEnumerator)m_Enumerator).Reset(); } public void Dispose() { m_Enumerator.Dispose(); } } The key line here is the MoveNext method. When I initially coded this, I thought that the call to m_Enumerator.MoveNext() would alter the enumerator state in the m_Enumerator class variable and so the enumeration would proceed in an orderly fashion through the collection. However, when I ran this code it went into an infinite loop - the m_Enumerator.MoveNext() call wasn't actually changing the state in the m_Enumerator variable at all, and my code was looping forever on the first collection element. It was only after disassembling that method that I found out what was going on The MoveNext method above results in the following IL: .method public hidebysig newslot virtual final instance bool MoveNext() cil managed { .maxstack 1 .locals init ( [0] bool CS$1$0000, [1] valuetype [System]System.Collections.Generic.LinkedList`1/Enumerator CS$0$0001) L_0000: nop L_0001: ldarg.0 L_0002: ldfld valuetype [System]System.Collections.Generic.LinkedList`1/Enumerator EnumeratorWrapper::m_Enumerator L_0007: stloc.1 L_0008: ldloca.s CS$0$0001 L_000a: call instance bool [System]System.Collections.Generic.LinkedList`1/Enumerator::MoveNext() L_000f: stloc.0 L_0010: br.s L_0012 L_0012: ldloc.0 L_0013: ret } Here, the important line is 0002 - m_Enumerator is accessed using the ldfld operator, which does the following: Finds the value of a field in the object whose reference is currently on the evaluation stack. So, what the MoveNext method is doing is the following: public bool MoveNext() { LinkedList<int>.Enumerator CS$0$0001 = this.m_Enumerator; bool CS$1$0000 = CS$0$0001.MoveNext(); return CS$1$0000; } The enumerator instance being modified by the call to MoveNext is the one stored in the CS$0$0001 variable on the stack, and not the one in the EnumeratorWrapper class instance. Hence why the state of m_Enumerator wasn't getting updated. Hmm, ok. Well, why is it doing this? If you have a read of Eric Lippert's blog post about this issue, you'll notice he quotes a few sections of the C# spec. In particular, 7.5.4: ...if the field is readonly and the reference occurs outside an instance constructor of the class in which the field is declared, then the result is a value, namely the value of the field I in the object referenced by E. And my m_Enumerator field is readonly! Indeed, if I remove the readonly from the class variable then the problem goes away, and the code works as expected. The IL confirms this: .method public hidebysig newslot virtual final instance bool MoveNext() cil managed { .maxstack 1 .locals init ( [0] bool CS$1$0000) L_0000: nop L_0001: ldarg.0 L_0002: ldflda valuetype [System]System.Collections.Generic.LinkedList`1/Enumerator EnumeratorWrapper::m_Enumerator L_0007: call instance bool [System]System.Collections.Generic.LinkedList`1/Enumerator::MoveNext() L_000c: stloc.0 L_000d: br.s L_000f L_000f: ldloc.0 L_0010: ret } Notice on line 0002, instead of the ldfld we had before, we've got a ldflda, which does this: Finds the address of a field in the object whose reference is currently on the evaluation stack. Instead of loading the value, we're loading the address of the m_Enumerator field. So now the call to MoveNext modifies the enumerator stored in the class rather than on the stack, and everything works as expected. Previously, I had thought enumerator structs were an odd but interesting feature of the BCL that I had used in the past to do linked list slices. However, effects like this only underline how dangerous mutable structs are, and I'm at a loss to explain why the enumerators were implemented as structs in the first place. (interestingly, the SortedList<TKey, TValue> enumerator is a struct but is private, which makes it even more odd - the only way it can be accessed is as a boxed IEnumerator!). I would love to hear people's theories as to why the enumerators are implemented in such a fashion. And bonus points if you can explain why LinkedList<int>.Enumerator.Reset is an explicit implementation but Dispose is implicit... Note to self: never ever ever code a mutable struct.

    Read the article

  • Is This Your Idea of Disaster Recovery?

    - by rickramsey
    Don't just make do with less. Protect what you've got. By, for instance, deploying Oracle Solaris 10 inside a zone cluster. "Wait," you say, "what is a zone cluster?" It is a zone deployed across different physical servers. "Who would do that!" you ask in a mild panic. Why, an upstanding sysadmin citizen interested in protecting his or her employer's investment with appropriate high availability and disaster recovery. If one server gets wiped out by Hurricane Sandy along with pretty much the entire East Coast of the USA, your zone continues to run on the other server(s). Provided you set them up in Edinburgh. This white paper (pdf) explains what a zone cluster is and how to use it. If a white paper reminds you of having to read War and Peace in school, just use this Oracle RAC and Solaris Cluster Cheat Sheet, instead. "But wait!" you exclaim. "I didn't realize Solaris 10 offered zone clusters!" I didn't, either! And in an earlier version of this blog post I said that zone clusters were only available with Oracle Solaris 11. But Karoly Vegh pointed me to the documentation for Oracle Solaris Cluster 3.3, which explains how to manage zone clusters in Oracle Solaris 10. Bite my fist! So, the point I was trying to make is not just that you can run Oracle Solaris 10 zone clusters, but that you can run them in an Oracle Solaris 11 environment. Now let's return to our conversation and pick up where we left off ... "Oh no! Whatever shall I do?" Fear not. Remember how Oracle Solaris 11 lets you create a Solaris 10 branded zone inside a system running Oracle Solaris 11? Well, the Solaris Cluster engineers thought that was a bang-up idea, and decided to extend Oracle Solaris Cluster so that you could run your Solaris 10 applications inside the protective cocoon of an Oracle Solaris 11 zone cluster. Take advantage of the installation improvements and network virtualization capabilities of Oracle Solaris 11 while still running your application on Oracle Solaris 10. You Luddite, you. That capability is in the latest release of Oracle Solaris Cluster, version 4.1, which became available last Friday. "Last Friday! Is it too late to get a copy?" You can still get a free copy from our download center (see below). And, if you'd like to know what other goodies the 4.1 release of Oracle Solaris Cluster provides, see: What's New In Oracle Solaris Cluster 4.1 (pdf) Free download Oracle Solaris Cluster 4.1 (SPARC or x86) Tech Article: How to Upgrade to Oracle Solaris Cluster 4.0, by Tim Read. As always, you can get the latest information about Oracle Solaris Cluster, plus technical how-to articles, documentation, and more from Oracle Solaris Cluster Resource Page for Sysadmins and Developers. And don't forget about the online launch of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, scheduled for Nov 7. "I feel so much better, now!" Think nothing of it. That's what we're here for. - Rick Website Newsletter Facebook Twitter

    Read the article

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