{"id":353,"date":"2009-08-28T00:20:03","date_gmt":"2009-08-27T23:20:03","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=353"},"modified":"2009-08-28T00:20:03","modified_gmt":"2009-08-27T23:20:03","slug":"net-c-to-vb-refactoring","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/","title":{"rendered":".Net C# to VB + refactoring"},"content":{"rendered":"<p>While translating some of the C# code of <a href=\"http:\/\/www.codeproject.com\/KB\/IP\/MyDownloader.aspx\" target=\"_blank\">MyDownloader<\/a> to VB.Net for the .Net download library, I&#8217;ve already come across quite some awkward code. IMHO, the underneath example could go into the <a href=\"http:\/\/www.codeproject.com\/Feature\/CodingHorrors.aspx\" target=\"_blank\">code horrors section<\/a> of <a href=\"http:\/\/www.codeproject.com\" target=\"_blank\">The Code Project<\/a>.<\/p>\n<p>[cc lang=&#8221;csharp&#8221; width=&#8221;607&#8243;]        private void RestartDownload()<br \/>\n        {<br \/>\n            int currentTry = 0;<br \/>\n            Stream stream;<br \/>\n            RemoteFileInfo newInfo;<\/p>\n<p>            try<br \/>\n            {<br \/>\n                do<br \/>\n                {<br \/>\n                    lastError = null;<\/p>\n<p>                    SetState(DownloaderState.Preparing);<\/p>\n<p>                    currentTry++;<br \/>\n                    try<br \/>\n                    {<br \/>\n                        newInfo = defaultDownloadProvider.GetFileInfo(this.ResourceLocation, out stream);<\/p>\n<p>                        break;<br \/>\n                    }<br \/>\n                    catch (Exception ex)<br \/>\n                    {<br \/>\n                        lastError = ex;<br \/>\n                        if (currentTry < Settings.Default.MaxRetries)\n                        {\n                            SetState(DownloaderState.WaitingForReconnect);\n                            Thread.Sleep(TimeSpan.FromSeconds(Settings.Default.RetryDelay));\n                        }\n                        else\n                        {\n                            return;\n                        }\n                    }\n                }\n                while (true);\n            }\n            finally\n            {\n                SetState(DownloaderState.Prepared);\n            }\n\n            try\n            {\n                \/\/ check if the file changed on the server\n                if (!newInfo.AcceptRanges ||\n                    newInfo.LastModified > RemoteFileInfo.LastModified ||<br \/>\n                    newInfo.FileSize != RemoteFileInfo.FileSize)<br \/>\n                {<br \/>\n                    this.remoteFileInfo = newInfo;<br \/>\n                    StartSegments(this.RequestedSegments, stream);<br \/>\n                }<br \/>\n                else<br \/>\n                {<br \/>\n                    if (stream != null)<br \/>\n                    {<br \/>\n                        stream.Dispose();<br \/>\n                    }<\/p>\n<p>                    RunSegments();<br \/>\n                }<br \/>\n            }<br \/>\n            catch (ThreadAbortException)<br \/>\n            {<br \/>\n                throw;<br \/>\n            }<br \/>\n            catch (Exception ex)<br \/>\n            {<br \/>\n                lastError = ex;<br \/>\n                SetState(DownloaderState.EndedWithError);<br \/>\n            }<br \/>\n        }<br \/>\n[\/cc]<\/p>\n<p>Why? It uses breaks and returns in the middle of the code, like if C# is some lame generic language without selection structures. The use of the try-catch bloks also seems odd. Also have a look at the condition for the do while loop &#8211; lol. The only thing missing are a few GoTo statements, which would have convinced me to print this out and torture fellow geeks with \ud83d\ude00<\/p>\n<p>I started off translating this literally, but got so annoyed by the bad coding practice I decided to attempt to rewrite it. I say &#8216;attempt&#8217;, cause code written like that is not easy to understand, esp for people who are used to &#8216;decent&#8217; structured code. I splitted the code into 2 subs instead of one, removed all breaks, returns, the insane do while true and put only the required code in try catches.<\/p>\n<p>[cc lang=&#8221;vbnet&#8221; width=&#8221;607&#8243;]        Private Sub RestartDownload()<br \/>\n            Dim tryNr As Int32 = 0<br \/>\n            Dim stream As Stream<br \/>\n            Dim newInfo As RemoteFileInfo<br \/>\n            Dim reachedMaxTries, hasError As Boolean<\/p>\n<p>            Do<br \/>\n                m_lastError = Nothing<\/p>\n<p>                Me.SetState(DownloadState.Preparing)<\/p>\n<p>                Try<br \/>\n                    newInfo = Me.ProtocolProvider.GetFileInfo(Me.FileLocation, stream)<br \/>\n                Catch ex As Exception<br \/>\n                    m_lastError = ex<br \/>\n                End Try<\/p>\n<p>                hasError = m_lastError IsNot Nothing<\/p>\n<p>                If hasError Then<br \/>\n                    tryNr += 1<br \/>\n                    reachedMaxTries = tryNr >= Me.Settings.MaxRetries<br \/>\n                End If<\/p>\n<p>                If hasError And Not reachedMaxTries Then<br \/>\n                    Me.SetState(DownloadState.WaitingForReconnect)<br \/>\n                    Thread.Sleep(Me.Settings.RetryDelay)<br \/>\n                End If<br \/>\n            Loop Until Not hasError Or reachedMaxTries<\/p>\n<p>            If hasError Then<br \/>\n                Me.SetState(DownloadState.EndedWithError)<br \/>\n            Else<br \/>\n                Me.SetState(DownloadState.Prepared)<br \/>\n                Me.RestartSegments(newInfo, stream)<br \/>\n            End If<br \/>\n        End Sub<\/p>\n<p>        Private Sub RestartSegments(ByVal newInfo As RemoteFileInfo, ByVal stream As Stream)<br \/>\n            If Not newInfo.AcceptRanges Or newInfo.ModifyDateTime > Me.FileInfo.ModifyDateTime Or newInfo.FileSize <> Me.FileInfo.FileSize Then<br \/>\n                m_fileInfo = newInfo<br \/>\n                Me.AttemptToStartSegements(stream)<br \/>\n            Else<br \/>\n                If stream IsNot Nothing Then stream.Dispose()<br \/>\n                Me.RunSegments()<br \/>\n            End If<br \/>\n        End Sub[\/cc] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>While translating some of the C# code of MyDownloader to VB.Net for the .Net download library, I&#8217;ve already come across&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[9,55,64,80,181,215,258,273],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-programming","tag-net","tag-c","tag-code-horror","tag-downloadlib","tag-open-source","tag-refactoring","tag-the-code-project","tag-vb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>.Net C# to VB + refactoring - Blog of Jeroen De Dauw<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\".Net C# to VB + refactoring - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"While translating some of the C# code of MyDownloader to VB.Net for the .Net download library, I&#8217;ve already come across&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2009-08-27T23:20:03+00:00\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\".Net C# to VB + refactoring\",\"datePublished\":\"2009-08-27T23:20:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/\"},\"wordCount\":449,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"keywords\":[\".Net\",\"C#\",\"Code horror\",\"DownloadLib\",\"Open Source\",\"Refactoring\",\"The Code Project\",\"VB\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/\",\"name\":\".Net C# to VB + refactoring - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"datePublished\":\"2009-08-27T23:20:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2009\\\/08\\\/28\\\/net-c-to-vb-refactoring\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\".Net C# to VB + refactoring\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":".Net C# to VB + refactoring - Blog of Jeroen De Dauw","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/","og_locale":"en_US","og_type":"article","og_title":".Net C# to VB + refactoring - Blog of Jeroen De Dauw","og_description":"While translating some of the C# code of MyDownloader to VB.Net for the .Net download library, I&#8217;ve already come across&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2009-08-27T23:20:03+00:00","author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":".Net C# to VB + refactoring","datePublished":"2009-08-27T23:20:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/"},"wordCount":449,"commentCount":0,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"keywords":[".Net","C#","Code horror","DownloadLib","Open Source","Refactoring","The Code Project","VB"],"articleSection":["Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/","url":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/","name":".Net C# to VB + refactoring - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"datePublished":"2009-08-27T23:20:03+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/28\/net-c-to-vb-refactoring\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":".Net C# to VB + refactoring"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-5H","jetpack-related-posts":[{"id":809,"url":"https:\/\/www.entropywins.wtf\/blog\/2010\/05\/01\/bn-converter-pro-1-1-0-released\/","url_meta":{"origin":353,"position":0},"title":"BN+ Converter Pro 1.1.0 released","author":"Jeroen","date":"2010-05-01","format":false,"excerpt":"Two months back I dug up the project files of BN+ Converter Pro, a .Net application I created when I was in secondary school, and did some high level refactoring to optimize it for .Net 4.0 and version 3 of my .Net class library. This was soon after I released\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"BN+ Converter Pro 1.0.6","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2010\/05\/Bnc1.0.6.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1821,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/10\/29\/refactoring-horrible-lua-code\/","url_meta":{"origin":353,"position":1},"title":"Object Orientated Lua code","author":"Jeroen","date":"2016-10-29","format":false,"excerpt":"During the last few weeks I've been refactoring some horrible Lua code. This has been a ton of fun so far, and I learned many new things about Lua that I'd like to share. Such\u00a0Horrible Code The code in question is that of a scripted Supreme Commander Forged Alliance Forever\u2026","rel":"","context":"In &quot;Gaming&quot;","block_context":{"text":"Gaming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/gaming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/10\/final-rush-loc.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":248,"url":"https:\/\/www.entropywins.wtf\/blog\/2009\/07\/26\/on-to-0-2-refactoring-fun\/","url_meta":{"origin":353,"position":2},"title":"On to 0.2 &#8211; Refactoring fun","author":"Jeroen","date":"2009-07-26","format":false,"excerpt":"Since the 0.1 release of Maps and Semantic Maps, I've gotten quite some feedback on what features are in demand and what could be improved. Although I've not gotten any specific feedback on the extensions source code itself, I decided that refactoring it to get it as high quality as\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":34,"url":"https:\/\/www.entropywins.wtf\/blog\/2009\/04\/28\/bug-submitter-dialog\/","url_meta":{"origin":353,"position":3},"title":"Bug Submitter Dialog","author":"Jeroen","date":"2009-04-28","format":false,"excerpt":"Half a month ago I published a .Net dialog, written in VB, that allows users to easily submit bugs and other feedback on an application. The dialog features 2 types of validation, submits the data to a webservice on a separate thread, and is designed to be very user friendly.\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2009\/04\/bugreporter_form.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2877,"url":"https:\/\/www.entropywins.wtf\/blog\/2022\/09\/21\/advice-for-junior-developers\/","url_meta":{"origin":353,"position":4},"title":"Advice for junior developers","author":"Jeroen","date":"2022-09-21","format":false,"excerpt":"Over the 15+ years of my development career, I have learned several things that significantly increase my effectiveness. In this post, I share those learnings with you. Structure: Generic Advice -- Important context and motivation for the technical advice Technical Advice -- The main course Recommended Reading -- Links to\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2022\/09\/code.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2022\/09\/code.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2022\/09\/code.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2022\/09\/code.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2022\/09\/code.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":349,"url":"https:\/\/www.entropywins.wtf\/blog\/2009\/08\/26\/net-download-library-taking-form\/","url_meta":{"origin":353,"position":5},"title":".Net download library taking form","author":"Jeroen","date":"2009-08-26","format":false,"excerpt":"Today did quite some work on .Net download library, the successor to my current FileDownloader class. I started off with finishing the protocol provider code (see revision 4), and then went on adding a lot of the still missing stuff to the Download class (see revision 5), which now counts\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":0,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}