<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Dreamwidth Development Training</title>
  <link>https://dw-dev-training.dreamwidth.org/</link>
  <description>Dreamwidth Development Training - Dreamwidth Studios</description>
  <lastBuildDate>Thu, 20 Sep 2012 03:51:47 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>dw_dev_training</lj:journal>
  <lj:journaltype>community</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/92798/30813</url>
    <title>Dreamwidth Development Training</title>
    <link>https://dw-dev-training.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/40668.html</guid>
  <pubDate>Thu, 20 Sep 2012 03:51:47 GMT</pubDate>
  <title>On reusing/tweaking code in a language you don&apos;t know</title>
  <link>https://dw-dev-training.dreamwidth.org/40668.html</link>
  <description>Posted by: &lt;span lj:user=&apos;aedifica&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://aedifica.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://aedifica.dreamwidth.org/&apos;&gt;&lt;b&gt;aedifica&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hi all!  This isn&apos;t directly about Dreamwidth development, but I was encouraged to post it here because it&apos;s an example of how one might approach a problem in a strange language.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/40668.html#cutid1&quot;&gt;Long post got loooong&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;TL;DR:  If you know a very little bit about programming languages, you know English, and you have Google (or your search engine of choice), you may be able to tweak some existing code to do what you want.  Hooray!  Also, COMMENT YOUR CODE!  The life you save may be your own!  And so forth.  :-D&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=40668&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/40668.html</comments>
  <category>walkthroughs</category>
  <lj:security>public</lj:security>
  <lj:poster>aedifica</lj:poster>
  <lj:reply-count>8</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/33924.html</guid>
  <pubDate>Sun, 25 Mar 2012 13:02:24 GMT</pubDate>
  <title>Test Plan Walkthrough: Bug 2154</title>
  <link>https://dw-dev-training.dreamwidth.org/33924.html</link>
  <description>Posted by: &lt;span lj:user=&apos;purplecat&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://purplecat.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://purplecat.dreamwidth.org/&apos;&gt;&lt;b&gt;purplecat&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As well as uploading a  patch file for bug 2154, I uploaded the notes I had made for the test plan for the patch in case they were of use in the review process.  &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://denise.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user_staff.png&apos; alt=&apos;[staff profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://denise.dreamwidth.org/&apos;&gt;&lt;b&gt;denise&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; asked if I could write a post explaining how I came up with the tests for this comm, since it was something people often asked about.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/33924.html#cutid1&quot;&gt;Generating Tests for Bug 2154&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=33924&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/33924.html</comments>
  <category>testing</category>
  <category>walkthroughs</category>
  <category>bug 2154</category>
  <lj:security>public</lj:security>
  <lj:poster>purplecat</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/27698.html</guid>
  <pubDate>Sun, 11 Sep 2011 02:05:15 GMT</pubDate>
  <title>Walkthrough for bug #2159 (part 1)</title>
  <link>https://dw-dev-training.dreamwidth.org/27698.html</link>
  <description>Posted by: &lt;span lj:user=&apos;kareila&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://kareila.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://kareila.dreamwidth.org/&apos;&gt;&lt;b&gt;kareila&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=2159&quot;&gt;http://bugs.dwscoalition.org/show_bug.cgi?id=2159&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First problem: how to generate the image.&lt;br /&gt;&lt;br /&gt;No idea.  How do comment counts do it?&lt;br /&gt;&lt;br /&gt;To answer that question, I will load the dw-free change history into&lt;br /&gt;my text editor to find the relevant code.  A &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://changelog.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/comm_staff.png&apos; alt=&apos;[site community profile] &apos; width=&apos;16&apos; height=&apos;16&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://changelog.dreamwidth.org/&apos;&gt;&lt;b&gt;changelog&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; search might also&lt;br /&gt;work for this.&lt;br /&gt;&lt;br /&gt;(All commands assume execution at the top level of dw-free.)&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;hg log -v -r 1: | bbedit&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Looks like the relevant file is htdocs/tools/commentcount.bml, according&lt;br /&gt;to the original bugfix from Allen.  But that file isn&apos;t there!  Searching&lt;br /&gt;further, it becomes apparent that Dre moved this to a controller in the&lt;br /&gt;course of her crusade to slay BML.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;bbedit cgi-bin/DW/Controller/CommentCount.pm&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Not much code!  Most of it is using Image::Magick methods.  The only&lt;br /&gt;non-obvious parameter is the size of the image - how big should it be&lt;br /&gt;for our text?  We will have to use trial and error.&lt;br /&gt;&lt;br /&gt;What should our arguments be?  Comment count uses user and ditemid, the&lt;br /&gt;necessary information to figure out which entry is referenced.  For our&lt;br /&gt;image, we should only need the text of the invite code itself.&lt;br /&gt;&lt;br /&gt;Hmm.  Since we only have two states to communicate, used and available,&lt;br /&gt;maybe instead of using dynamic text like comment count does, we should&lt;br /&gt;use icons - perhaps a green check mark for available, a red stop sign&lt;br /&gt;for used.  This has the advantage of not requiring the viewer to&lt;br /&gt;understand English.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;open htdocs/img/silk/site/tick.png&lt;/tt&gt;&lt;br /&gt;&lt;tt&gt;open htdocs/img/silk/comments/delete.png&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Those are pretty close!  Let&apos;s see if we can figure out how to return&lt;br /&gt;those images as responses, instead of using Image::Magick.  I think the&lt;br /&gt;best way to do this is to redirect the request to the URL of the image,&lt;br /&gt;and use HTTP headers to tell the browser how long to cache it.&lt;br /&gt;&lt;br /&gt;Once an invite code is used, it will never revert to being unused.  We may&lt;br /&gt;be able to reduce the computation needed for this feature by extending the&lt;br /&gt;cache period once the code activation is detected.  On second thought, though,&lt;br /&gt;this may not be true for promo codes, and our tool will work for those too.&lt;br /&gt;&lt;br /&gt;Time to decide on the name of our controller and the site URL that will be&lt;br /&gt;used to point to the dynamic image.  Once we make those decisions, the new&lt;br /&gt;controller can be written and tested independent of any other work that needs&lt;br /&gt;to be done for this bug.  We&apos;ll also need to consult DW::InviteCodes for the&lt;br /&gt;function that tells us whether a code has already been used or not.&lt;br /&gt;&lt;br /&gt;The actual code as described above doesn&apos;t take long to write.  Unfortunately,&lt;br /&gt;the name of the source image is advertised to the end user because we used&lt;br /&gt;a redirect.  But since the images are intended to be embedded in a page,&lt;br /&gt;the redirection shouldn&apos;t be obvious in normal use conditions.&lt;br /&gt;&lt;br /&gt;You can read through the resulting patch here:&lt;br /&gt;&lt;a href=&quot;http://bugs.dwscoalition.org/attachment.cgi?id=5472&quot;&gt;http://bugs.dwscoalition.org/attachment.cgi?id=5472&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let me know if anything I wrote needs further explanation.  :)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=27698&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/27698.html</comments>
  <category>walkthroughs</category>
  <lj:security>public</lj:security>
  <lj:poster>kareila</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/24258.html</guid>
  <pubDate>Tue, 05 Oct 2010 08:02:32 GMT</pubDate>
  <title>Getting started with the DW codebase.</title>
  <link>https://dw-dev-training.dreamwidth.org/24258.html</link>
  <description>Posted by: &lt;span lj:user=&apos;tyggerdev&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://tyggerdev.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://tyggerdev.dreamwidth.org/&apos;&gt;&lt;b&gt;tyggerdev&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&quot;Hudson: Is this gonna be a standup fight, sir, or another bughunt?&lt;br /&gt;Gorman: All we know is that there&apos;s still no contact with the colony, and that a xenomorph may be involved.&lt;br /&gt;Frost: Excuse me sir, a-a what?&lt;br /&gt;Gorman: A xenomorph.&lt;br /&gt;Hicks: It&apos;s a bughunt. &quot;&lt;br /&gt;&lt;br /&gt;One of the eternal problems faced by large open source projects is keeping new developers. People show up with the best of intentions, but unless they have experience in the specific problem domain, language, and even the toolset of the project already, the barrier to entry just in finding the right file to edit can be overwhelming. Let alone suddenly having to learn ssh, cvs and the command line. I have written up my recent experiences with dw - I only got here last week, so I&apos;m still very much at the &quot;where do I even *find* that?&quot; stage, but I have a little experience with this sort of thing, so hopefully this will be helpful.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://tyggerdev.dreamwidth.org/470.html&quot;&gt;http://tyggerdev.dreamwidth.org/470.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy. And remember, the more feedback you add here or over there, the less work new developers have to do later :)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=24258&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/24258.html</comments>
  <category>walkthroughs</category>
  <lj:security>public</lj:security>
  <lj:poster>tyggerdev</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/9290.html</guid>
  <pubDate>Mon, 24 Aug 2009 17:50:53 GMT</pubDate>
  <title>Review 101</title>
  <link>https://dw-dev-training.dreamwidth.org/9290.html</link>
  <description>Posted by: &lt;span lj:user=&apos;yvi&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://yvi.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://yvi.dreamwidth.org/&apos;&gt;&lt;b&gt;yvi&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hello and welcome to today&apos;s feature on &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://dw-dev-training.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/comm_staff.png&apos; alt=&apos;[site community profile] &apos; width=&apos;16&apos; height=&apos;16&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://dw-dev-training.dreamwidth.org/&apos;&gt;&lt;b&gt;dw_dev_training&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;. I&apos;ll be your host today and we will be discussing:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;strong&gt;Review 101&lt;br /&gt;Or: How to get that queue a tiny bit smaller&lt;/strong&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;[Note: There is also a Wiki page on code reviewing &lt;a href=&quot;http://wiki.dwscoalition.org/notes/Code_Review&quot;&gt;http://wiki.dwscoalition.org/notes/Code_Review&lt;/a&gt; ,which you might want to read. I will likely expand that page soon]&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/9290.html#cutid1&quot;&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Sorry if this was short in places or unclear, I wrote this down rather quickly and my fingers are starting to hurt. Comments welcomed, as I would love to post a finished up version of this on the Wiki.&lt;br /&gt;&lt;br /&gt;And I hope this helps someone :) Reviewing is nice, needed and not that difficult! &lt;br /&gt;&lt;br /&gt;And nobody will kill you if you do something wrong. Really! For any questions, the Dreamwidth channels #dw and #dw_kindergarten are also welcoming of questions regarding reviewing.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=9290&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/9290.html</comments>
  <category>walkthroughs</category>
  <category>reviewing</category>
  <lj:security>public</lj:security>
  <lj:poster>yvi</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/6354.html</guid>
  <pubDate>Sun, 02 Aug 2009 05:14:43 GMT</pubDate>
  <title>Walkthrough for Bug 1518</title>
  <link>https://dw-dev-training.dreamwidth.org/6354.html</link>
  <description>Posted by: &lt;span lj:user=&apos;denise&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://denise.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user_staff.png&apos; alt=&apos;[staff profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://denise.dreamwidth.org/&apos;&gt;&lt;b&gt;denise&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a walkthrough for how I patched Bug 1518, &quot;Option to get notified by email when you send a message&quot;. I wrote up this walkthrough because it&apos;s a good example (IMO) of how a developer makes design choices when taking a top-level bug description and sitting down to implement it -- both architectural/code design and user interface design.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/6354.html#cutid1&quot;&gt;and away we go&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=6354&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/6354.html</comments>
  <category>walkthroughs</category>
  <lj:security>public</lj:security>
  <lj:poster>denise</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/5725.html</guid>
  <pubDate>Thu, 30 Jul 2009 03:02:37 GMT</pubDate>
  <title>Bug Walkthrough: Bug 1512</title>
  <link>https://dw-dev-training.dreamwidth.org/5725.html</link>
  <description>Posted by: &lt;span lj:user=&apos;denise&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://denise.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user_staff.png&apos; alt=&apos;[staff profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://denise.dreamwidth.org/&apos;&gt;&lt;b&gt;denise&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I decided to take on &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=1512&quot;&gt;Bug 1512&lt;/a&gt; as a quick hit, and thought I&apos;d do a walkthrough so people could see my process!&lt;br /&gt;&lt;br /&gt;(I like having walkthroughs. I think we should do them more often!)&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/5725.html#cutid1&quot;&gt;My process&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=5725&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/5725.html</comments>
  <category>walkthroughs</category>
  <category>bug walkthrough</category>
  <category>bug 1512</category>
  <lj:security>public</lj:security>
  <lj:poster>denise</lj:poster>
  <lj:reply-count>8</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/3941.html</guid>
  <pubDate>Mon, 13 Jul 2009 15:29:04 GMT</pubDate>
  <title>Tracking the original source of an edit</title>
  <link>https://dw-dev-training.dreamwidth.org/3941.html</link>
  <description>Posted by: &lt;span lj:user=&apos;sophie&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://sophie.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://sophie.dreamwidth.org/&apos;&gt;&lt;b&gt;sophie&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sometimes, it&apos;s useful to be able to track how a change made its way into the codebase to start with, for tracking why something is a certain way when it seems totally nonsensical or non-obvious.&lt;br /&gt;&lt;br /&gt;Fortunately, it&apos;s easy to do so with the versioning systems that Dreamwidth and LiveJournal use, which track every single change made to the source code. (It&apos;s quite literally possible to specify any arbitrary date and pull a complete copy of the source code as it was on that date.) In this post, I&apos;m going to use this feature to track down the original source of the FIXME that &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; mentioned in &lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html&quot;&gt;her wonderful bug walkthrough&lt;/a&gt;, to try to see if it&apos;s possible to find out what it&apos;s for.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/3941.html#cutid1&quot;&gt;Walking down Memory Lane...&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=3941&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/3941.html</comments>
  <category>walkthroughs</category>
  <category>mercurial</category>
  <category>mercurial walkthrough</category>
  <lj:security>public</lj:security>
  <lj:poster>sophie</lj:poster>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/3224.html</guid>
  <pubDate>Tue, 30 Jun 2009 03:00:30 GMT</pubDate>
  <title>Bug 1362 fix walkthrough: If journal title == user name, name doesn&apos;t display on profile.</title>
  <link>https://dw-dev-training.dreamwidth.org/3224.html</link>
  <description>Posted by: &lt;span lj:user=&apos;kareila&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://kareila.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://kareila.dreamwidth.org/&apos;&gt;&lt;b&gt;kareila&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here&apos;s my take on a simple bug I patched in five minutes.  Most of the bugs I investigate are not this quick, but I wanted to use a simple example to encourage people to get their feet wet.  Many of the bugs that get filed are actually not very complex, especially if they have the &quot;effort-minor&quot; keyword.&lt;br /&gt;&lt;br /&gt;The bug in question here is &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=1362&quot;&gt;bug 1362&lt;/a&gt;, &quot;If journal title == user name, name doesn&apos;t display on profile.&quot;  So we have to look at the code that generates the profile page.  As a longtime LJ user, I happen to know that the canonical reference to the profile code is in /userinfo.bml, and the /profile and /info links on the user pages redirect to that.  But if you didn&apos;t know that, you could either spend some time in the code looking around until you found it, or ask a developer to give you the starting point.  In my personal experience, I asked for starting points for the first two or three bugs I did, and after that started looking around more on my own to get a feel for where important things tended to live.&lt;br /&gt;&lt;br /&gt;The next thing for a new developer to realize is that because user-visible strings are supposed to be translatable for different languages, they are not (read: not supposed to be) stored in the code file itself, but in a companion file with the suffix .text.  This is well documented in the section of the DW wiki that talks about English-stripping.  In this case, if I look in htdocs/userinfo.bml.text, I find that &quot;Name:&quot; has the translation label of .label.name.  We need to find out where this is being printed.&lt;br /&gt;&lt;br /&gt;Somewhat confusingly, I don&apos;t find any references to .label.name in userinfo.bml itself, which means it&apos;s being called in another part of the code.  So on the command line, I use grep -r to find all references to .label.name.  The grep command is a developer&apos;s best friend, and the main reason to have a checked out copy of the code as opposed to browsing the repository through the web interface.  One of my favorite techniques (not needed for this bug) is to grep &apos;sub function_name&apos; to find the definition of a function, ignoring all the places the function is merely called, which you would see if you just grepped &apos;function_name&apos;.  Anyway, this command shows me that .label.name is called from cgi-bin/DW/Logic/ProfilePage.pm, line 357: &lt;code&gt;grep -r \.label\.name .&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The reported problem is that the name doesn&apos;t print if the name equals the journal title.  We can see the code is doing exactly that:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;unless ( $name eq $u-&amp;gt;prop( &apos;journaltitle&apos; ) ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$ret-&amp;gt;[0] = LJ::Lang::ml( &apos;.label.name&apos; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$ret-&amp;gt;[1] = $name;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So all we have to do is remove the conditional surrounding the statements, and it will always print the name.  Problem solved!  I&apos;m not going to spend time here talking about how to generate a patch and test a fix, because that&apos;s covered elsewhere.&lt;br /&gt;&lt;br /&gt;My point is that the main work here was just finding the code to fix.  The actual change was pretty trivial.  I&apos;d go so far as to suggest that beginning developers look at many different types of bugs to figure out what parts of the code are involved.  Even if you can&apos;t figure out what changes need to be made to fix the bug, you&apos;ll still learn a lot in the process.&lt;br /&gt;&lt;br /&gt;Anyway, that&apos;s a bugfix from my perspective.  If you think I was too vague anywhere and you want more details, just ask!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=3224&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/3224.html</comments>
  <category>bug walkthrough</category>
  <category>walkthroughs</category>
  <category>bug 1362</category>
  <lj:security>public</lj:security>
  <lj:poster>kareila</lj:poster>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/2804.html</guid>
  <pubDate>Mon, 22 Jun 2009 15:49:13 GMT</pubDate>
  <title>Bug 1123 fix walkthrough: Post image link broken on update page</title>
  <link>https://dw-dev-training.dreamwidth.org/2804.html</link>
  <description>Posted by: &lt;span lj:user=&apos;afuna&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://afuna.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://afuna.dreamwidth.org/&apos;&gt;&lt;b&gt;afuna&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Walkthrough for &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=1123&quot;&gt;Bug 1123 - Post image link broken on update page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Table of contents&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#preparation&quot;&gt;Picking a bug / preparation / background&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#applyingchanges&quot;&gt;(Interlude) Applying changes&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#html&quot;&gt;HTML editor&lt;/a&gt;&lt;br /&gt;    &lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#html-finding&quot;&gt;Finding stuff&lt;/a&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href=&quot;#html-photobucket&quot;&gt;Photobucket&lt;/a&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href=&quot;#html-upload&quot;&gt;Upload from file&lt;/a&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href=&quot;#html-others&quot;&gt;Other issues&lt;/a&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#rte&quot;&gt;RTE&lt;/a&gt; &lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#rte-finding&quot;&gt;Finding stuff&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#patch&quot;&gt;Patch evaluation, clean up, submission&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;#review&quot;&gt;Getting reviewed, resubmitting&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;#form&quot;&gt;Form&lt;/a&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href=&quot;#function&quot;&gt;Function&lt;/a&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/2804.html#cutid1&quot;&gt;walkthrough, etc&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That got long! *laughs* Next time, I&apos;ll try to look for something shorter, and maybe also more technical.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=2804&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/2804.html</comments>
  <category>bug walkthrough</category>
  <category>walkthroughs</category>
  <category>bug 1123</category>
  <lj:security>public</lj:security>
  <lj:poster>afuna</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/2416.html</guid>
  <pubDate>Mon, 25 May 2009 06:59:07 GMT</pubDate>
  <title>Bug 858 fix walkthrough: Private messages strip (rather than escape) HTML </title>
  <link>https://dw-dev-training.dreamwidth.org/2416.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a walkthrough for how I tackled &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=858&quot;&gt;Bug 858   -  Private messages strip (rather than escape) HTML&lt;/a&gt;.  I&apos;m not a very experienced DW developer, so you&apos;re going to see me do a lot of bumbling around as I try to figure things out.  But, I&apos;m going to document all of my wrong turns and head scratchings in the hopes that seeing the whole process laid out from start to finish might help people who aren&apos;t sure how to go about things.  I will note ahead of time that some of the issues I run into won&apos;t happen to people on Dreamhacks--they&apos;re due to my setup not being completely right.&lt;br /&gt;&lt;br /&gt;To be honest, this walkthrough is a bit advanced and best suited for people already comfortable with the command line and coding.  I&apos;m going to do another one soon and hope that it doesn&apos;t go as awkwardly as this one did.&lt;br /&gt;&lt;br /&gt;Table of contents:&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#preparation&quot;&gt;Preparation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#finding&quot;&gt;Finding the relevant code to make changes on&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#changes&quot;&gt;Making the changes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#testing&quot;&gt;Testing&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#troubleshooting&quot;&gt;Troubleshooting&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#evaluation&quot;&gt;Patch evaluation and clean up&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#submitting&quot;&gt;Submitting the patch&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#hindsight&quot;&gt;Hindsight&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#lessons&quot;&gt;Lessons Summary&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dw-dev-training.dreamwidth.org/2416.html#notes&quot;&gt;Notes Summary&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev-training.dreamwidth.org/2416.html#cutid1&quot;&gt;The Walkthrough&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I hope this has been a useful walkthrough of the process of bug fixing and banging your head against things until they work.  If anybody has questions about the contents here, or suggestions about things I should have done differently, feel free to comment!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=2416&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/2416.html</comments>
  <category>bug 858</category>
  <category>bug walkthrough</category>
  <category>walkthroughs</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>11</lj:reply-count>
</item>
</channel>
</rss>
