tag:blogger.com,1999:blog-3258074296776382669.comments2022-12-03T08:51:36.571+01:00A World Full of Sharp ObjectsKjetil Klaussenhttp://www.blogger.com/profile/15985372289245420671noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-3258074296776382669.post-1219637609998051722017-10-31T08:59:55.916+01:002017-10-31T08:59:55.916+01:00Hi, Ryan!
Thanks for your comment, but I have to ...Hi, Ryan!<br /><br />Thanks for your comment, but I have to admit that I haven't kept up with virtualization lately so vhdx is unfortunately not something I know much about. But PreCompact is suppose to run on the virtual machine, and although I'm not a Linux guy, I believe running the precompact.exe on Linux is not supported :)<br /><br />As for a solution to your problem I'd suggest you take a look at the 'Edit virtual hard disk' wizard in the Hyper-V management console. A part from that I'm afraid I can't help you out here.<br /><br />-kjetilKjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-73046521729886555962017-10-30T17:32:08.425+01:002017-10-30T17:32:08.425+01:00Using Precompact.exe, I'm trying to compact a ...Using Precompact.exe, I'm trying to compact a non-ntfs vhdx guest virtual machine hard drive file running on a hyper-v 2012r2 host. <br /><br />Path on host is c:\hyper-v\dimension\data\dimension_data.vhdx<br /><br />'dimension_data.vhdx' is a Linux-formatted WatchGuard drive used for logging that is over 5tb in size.<br /><br />I looked over the switches and am perplexed on syntax needed to target drive since it isn't a 'disk' mapped by host OS.<br /><br />PRECOMPACT -SetDisk:<br /><br />Any thoughts on how to target this .vhdx file?<br /><br />Thanks,<br />Ryan<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-66028842134439860752016-03-11T07:14:12.805+01:002016-03-11T07:14:12.805+01:00Hi Rishi!
As far as I know there's no 'fa...Hi Rishi!<br /><br />As far as I know there's no 'fallback' logging in Log4Net, but what you can do is to log to multiple adapters. So for temporary logging (I presume that the log database won't be offline for a long period of time) you can set up a rolling file log in combination with the AdoAdapter.<br /><br />Another option would be to use an Enterprise Service Bus (ESB) or queueing system, like MSMQ, RabbitMQ or NServiceBus. You can then publish all log messagess as messages on the bus. Then you can set up a 'Log Subscriber' that will take care of putting those messages into e.g. a Sql database. If the database goes offline, the messages will remain in the queue untill the subscriber (database) is ready to process them again.<br /><br />Hope this helps :)Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-20064675328930072932015-12-17T06:24:01.804+01:002015-12-17T06:24:01.804+01:00Great article Kjetil Klaussen !!!
I am also devel...Great article Kjetil Klaussen !!!<br /><br />I am also developing an asp.net web application and want to log my exceptions into SQL DB. For this I am using Log4Net AdoNetAppender to log info into SQL DB, now the problem occurs when the DB goes offline. Log4Net doesn't persist the log messages. So all messages get lost while the DB was offline, is there any way to retain the messages until the DB comes online and then log all the messages to DB once it become available. Although by using reconnectonerror value="True" it starts logging again when DB is available but all intermediate messages while DB was offline are not logged.<br /><br />Or there exist any other approach to log exceptions in Db with offline support.Rishi.Kasniahttps://www.blogger.com/profile/12490699307311082146noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-16619998558949629832015-05-11T22:35:32.473+02:002015-05-11T22:35:32.473+02:00Thanks, Chris! I've corrected "Log" ...Thanks, Chris! I've corrected "Log" to "Logs" in the xml :)Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-42463163611740874842015-05-09T21:01:30.965+02:002015-05-09T21:01:30.965+02:00Great article! Thanks. One thing I noticed is th...Great article! Thanks. One thing I noticed is that your db table is named "Logs" and you insert statement references "Log".Anonymoushttps://www.blogger.com/profile/14926886087648613255noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-64552710871498087212015-01-26T08:48:55.430+01:002015-01-26T08:48:55.430+01:00As far as I know, Log4Net does not have this funct...As far as I know, Log4Net does not have this functionality. The easy way to solve this is to make a little batch script and scheduling it via cron or Windows Scheduled Tasks.Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-23820926438099155702015-01-20T06:29:36.546+01:002015-01-20T06:29:36.546+01:00Is there a way to ship the log to Archive path bef...Is there a way to ship the log to Archive path before the log is rolled over??Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-75633456877214244322014-12-21T15:41:04.190+01:002014-12-21T15:41:04.190+01:00Great! I like your solution and it solved my probl...Great! I like your solution and it solved my problem!<br /><br />Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-36515930763790120902014-08-12T08:23:46.580+02:002014-08-12T08:23:46.580+02:00@Anonymous: I don't think the precompact requi...@Anonymous: I don't think the precompact requires any extra free space. All it does AFAIK is to clean up deleted data on the VHD.Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-23678569380367292602014-08-05T20:55:41.546+02:002014-08-05T20:55:41.546+02:00Does doing the precompact.exe command require a ce...Does doing the precompact.exe command require a certain amount of free space to be available on the host?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-48615962833008490122014-06-10T16:40:02.027+02:002014-06-10T16:40:02.027+02:00thank you very muchthank you very muchAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-68674924146422862422014-04-29T10:38:40.405+02:002014-04-29T10:38:40.405+02:00no: Bra forklaring. Her er en annen jeg synes fork...no: Bra forklaring. Her er en annen jeg synes forklarer det godt også:<br /><br />en: Good explanation. Here's another I think explains it well:<br /><br />http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/Trond Ulsethhttp://trond.ulseth.nonoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-22884381593747273322013-10-14T04:43:31.157+02:002013-10-14T04:43:31.157+02:00Very helpful. Didn't even notice the TryExecut...Very helpful. Didn't even notice the TryExecuteTask abstract method before this post.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-6567735259804269142013-09-22T14:24:02.214+02:002013-09-22T14:24:02.214+02:00Thank you for this great explanation.
Strange that...Thank you for this great explanation.<br />Strange that this guide was so hard to find. Especially the DISKPART-part.<br /><br />I used next query in Google to find this page:<br />"Windows virtual pc" compact vhd -2007 -"windows xp" -hyper<br /><br />Mu VHD shrank for 30.4 Gb to 24.6 Gb.<br />Thank again,<br />EmielEmiel Nijhuishttp://redcirclesoftware.comnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-46285592800842047322013-06-25T14:40:28.271+02:002013-06-25T14:40:28.271+02:00Great, now I don't need to bug you every time ...Great, now I don't need to bug you every time :-)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-76211782855791340862012-10-22T12:31:33.521+02:002012-10-22T12:31:33.521+02:00@YvesHanoulle - We're using Subversion and Vis...@YvesHanoulle - We're using Subversion and Visual Studio. I'm using the AnkhSVN plugin for VS (http://ankhsvn.open.collab.net/), and in the 'pending changes' window I use enter the comment for my next commit when I start working on something. If I discover more things I should do or new things come up, I either do a commit with a "WIP:..." (Work In Progress) and then switch over, or if it's a quick fix that only span a file or two I'll commit those files separately and continue on my original work. If the new work item can wait, I just jot down the commit comment for that on paper and then enter that one in 'pending changes' as soon as I've committed what I was working on.Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-4099872964874608202012-10-22T11:50:14.151+02:002012-10-22T11:50:14.151+02:00I'm confused in how you do this. what tool do ...I'm confused in how you do this. what tool do you have that allows you to do this?<br />or do you write it in your favorite editor and then after writing the copde copy paste it?<br /><br />YvesHanoullehttp://www.hanoulle.benoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-6095418051206036742012-10-19T07:46:05.787+02:002012-10-19T07:46:05.787+02:00@Rainsberger - Exactly! I think about the commit i...@Rainsberger - Exactly! I think about the commit in the same way; What's the new features of the system. And I try to think about it in the context of the end user; If my comment would end up in the release notes, would it make sense to the customer?<br /><br />@Hurst - Yeah, I have the same problem my self. Starting out implementing a new feature and then discover some smaller and bigger refactorings that I should have done on the way. But I find that writing that comment first makes it easier to focus on what I started out with. If I discover other things along the way, I make a note (on paper) and then see if I can tackle that in the next commit. For smaller refactorings I just do them along the way.Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-70204770552951381572012-10-19T07:42:13.504+02:002012-10-19T07:42:13.504+02:00My way of looking at it is, if I go to do a blame ...My way of looking at it is, if I go to do a blame on this line a few years from now, is there enough context to know what happened.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-31734277576495342012-10-19T04:23:17.821+02:002012-10-19T04:23:17.821+02:00A problem I have (and it's one that commit-dri...A problem I have (and it's one that commit-driven development may help solve) is that I have a goal in mind at the onset of my plunge, but by the end, I've made more changes than I had anticipated and there's no good way to break up the commit. Taking the time to mentally break apart the commit at the front end could only help me.Josh Hursthttps://www.blogger.com/profile/07993730212970126190noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-78683115652310718112012-10-18T18:57:34.109+02:002012-10-18T18:57:34.109+02:00Whenever I write a commit comment, I like it to an...Whenever I write a commit comment, I like it to answer the question, "What can the system now do that it couldn't do before?" If I can name more than one significant thing, then it's possible I've committed too much, and try to take smaller steps.<br />J. B. Rainsbergerhttps://www.blogger.com/profile/16213943899864372362noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-16731005301830752872010-02-13T15:01:13.920+01:002010-02-13T15:01:13.920+01:00Oh, my. What a great comment. Feels like your comm...Oh, my. What a great comment. Feels like your comment deserves a blog post by its own :)<br /><br />The book you refer to, “Domain Driven Design – Tackling Complexity in the Heart of Software” by Eric Evans, is one of my all time favorites. I read it for the first time in early 2008 and I’ve read it again several times after that. It’s a book that every software craftsman should read. Even if you’re not going to follow the architectural design in DDD, this book is just packed with so many good advices and life experience that you simply cannot grasp it all by the first read. It’s a inexhaustible source of software wisdom.<br /><br />In my experience, DDD by itself is however not the whole answer to tackling complexity. There never is one solution the complexity we face in software. “There’s no silver bullet” as Fred Brooks states in “The Mythical Man-Month”. But my current belief is that mixing domain driven design with agile practices like short iterations and behavior and test-driven development, is one of the better ways to tackle complexity. <br /><br />But is that enough? No, I don’t think so. The code we write is written once, but it will (hopefully) be read 10 or maybe 100 times. So you need to have strong focus on the readability of the code. “Clean Code” by Robert C. Martin has some really good tips and lots of practical insight on making code more readable. But then again; “readable code” is subjective. What I find readable might not make much sense to you and vice versa. So the team needs to have a common agreement upon coding standards and a strong focus on making code as easy to understand as possible. Practicing code reviews, pair programming and coding dojos would help leveraging a common team practice.<br /><br />After all, code that’s poorly written and hard to read is hard to change no matter how many unit tests you throw around it.<br /><br />So, no; still haven’t found no silver bullet, but I’ll keep looking :)Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-40143682051126228432010-02-13T14:04:57.123+01:002010-02-13T14:04:57.123+01:00Good point. And it's something that I've b...Good point. And it's something that I've been thinking a bit about myself too. There is however a bit of danger in trying to ’dumb down’ a CQRS solution. And that is the overwhelming plumbing such a solution need to have. It’s the demo syndrome I guess; if you make a solution to demonstrate why CQRS is a great thing, you need to make it complex. Using this kind of architecture in a less complex problem space would simply be overkill (or over-architctecting rather). But to demonstrate the how one would rather make a simpler solution, but then again; you might not see the point in using CQRS. <br /><br />Anyway; I believe there’s always need for more sample code on this subject, and so I’m hoping to put something out in the upcoming weeks. First out is a demo on how to use a single WCF service as the gateway to the command handlers on the server side. Hopefully I’ll be able to build further on that and demonstrate the how of CQRS.<br /><br />Thanks for you input!Kjetil Klaussenhttps://www.blogger.com/profile/15985372289245420671noreply@blogger.comtag:blogger.com,1999:blog-3258074296776382669.post-54706406136290599272010-02-12T19:05:22.419+01:002010-02-12T19:05:22.419+01:00Hei Kjetil!
I presume, based on your choice of la...Hei Kjetil!<br /><br />I presume, based on your choice of language, that your blog is aimed at an English-speaking audience, so I'll follow your lead. <br /><br />This post being the required "Who am I?" page of your site means one could ask who I am to comment. But you do speak of a few things that are currently very trendy topics in our craft (trade? art?) and my comments relate to these.<br /><br />First, I think I've undergone a similar "awakening" as you have with regards to SCRUM/DFT (not quite the same yet related concepts, so I'll permit myself to lump them together here), design patterns, and "beautiful code", a rather fuzzier concept I would claim.<br /><br />However, I feel that there is one other aspect of software design that receives nowhere near the attention that it deserves. To me, it is "the elephant in the room".<br /><br />Ponder this: What is the root cause of complexity in software? There are many proximate causes to do with things like "the web was designed to be a gigantic library of interlinked documents, not to be an application platform" or interoperability problems or versioning issues. But what is the ultimate cause, the one that will never go away? The answer is so banal as to seem a bit stupid at first: The world is a complicated place. In slightly more academical terms, the complexity stems from the domain - whatever it is the application deals with is itself complex. <br /><br />So why then does almost nobody discuss domain modeling? Why is there so little talk about what techniques we can use to find elegant expressions of the important concepts involved in a domain? <br /><br />In many projects, particularly "expert systems" where the software needs to capture a lot of domain knowledge, the domain model is the heart of the system. It can serve as an expression of an entire development teams knowledge and provide a precisely defined terminology that domain experts and programmers share - and that is used consistently in documentation and code. <br /><br />If this peaked your interest at all, head over, for a great book, to Amazon.com (http://tinyurl.com/yf4hb27 for your convenience) and read the excerpt, then decide for yourself if you think it's worth reading. Personally, I think it is well written and providing lots of practical applicable technique, not just "philosophy". <br /><br />On a side note: Such "philosophy" (or sometimes dogma) is all too often all I get from postings about how to make software. For example, it might be good advice to recommend the use of a SCRUM process. I believe the premise of SCRUM is valid: These things are too complex to realistically do in a monolithic "plan first, then build" way. Feedback is necessary, hence the iterative approach. But at the same time there is surely something to the logic that you can't do much, and especially not do it well, if you have neither decided what to do nor given thought to how you'll do it. So to me, it would be far more valuable to see someone say something enlightning about how to determine the exact parameters of the process than just another (of thousands) of general recommendations of the approach. How do we decide how long the iterations ("sprints" in SCRUM terms) should last? Who should be included? The customers? Selected users? Marketing? Or just the domain experts and programmers?<br /><br />Marketing, since I have the chance: I'm currently looking for a job in Norway, should someone who reads this be hiring or know of someone who is. I imagine I'd most like to move to Kristiansand, Bodø, Trondheim or Oslo, but if the opportunity is sufficiently interesting and located in or near civilization I'd like to hear about it. :)The Polymorphisthttps://www.blogger.com/profile/12704013141246540417noreply@blogger.com