-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStruggling with Character Frequency Code.html
92 lines (83 loc) · 5.92 KB
/
Struggling with Character Frequency Code.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Character Frequency Blues</title>
<link rel="stylesheet" href="/theme/css/main.css" />
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alex Mendiola: Coder Atom Feed" />
<link href="/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alex Mendiola: Coder RSS Feed" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">Alex Mendiola: Coder </a></h1>
<nav><ul>
<li><a href="/pages/All about Alex.html">About</a></li>
<li><a href="/pages/Code of Conduct Page.html">Code of Conduct</a></li>
<li><a href="/category/intro.html">Intro</a></li>
<li class="active"><a href="/category/posts.html">Posts</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="/Struggling with Character Frequency Code.html" rel="bookmark"
title="Permalink to Character Frequency Blues">Character Frequency Blues</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2019-06-28T00:00:00-04:00">
Published: Fri 28 June 2019
</abbr>
<br />
<abbr class="modified" title="2019-06-28T00:00:00-04:00">
Updated: Fri 28 June 2019
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/alex-mendiola.html">Alex Mendiola</a>
</address>
<p>In <a href="/category/posts.html">Posts</a>.</p>
<p>tags: <a href="/tag/coding.html">Coding</a> <a href="/tag/struggles.html">Struggles</a> </p>
</footer><!-- /.post-info --> <p>As I review the coding challenges within Code with Mosh's <a href="https://codewithmosh.com/courses" target = "_blank">Python for Developers</a> course, the task of determining the most frequently used character in a string confounds me yet again. This time around, I'm able to more efficiently prepare the list of characters for counting, but storing the count of each character eludes me. </p>
<p>I remember from working with my mentor that my original situation required the string be read each time I counted each character. This got the job done, but was horribly inefficient. Therefore, this time around, I want to record a count only if a character repeats. That way, I only need to read the entire list once. </p>
<p>This unit of the Python course was by far the most difficult for me to understand and implement. That's why I'm taking my time to rewatch the videos in this section. Another benefit is that I know the challenge as I watch these lessons and approach this second (and sometimes third, fourth, etc.) viewing through the lens of counting characters. I think the issue for me is understanding the typical/practical use cases for each of the techniques with regard to data structures. Furthermore, I need to grasp how the Python interpreter "thinks" about data structures and these methods of interacting with data. </p>
<p>My mentor also pointed out a big failing with the Python language: memory management. Given his role at his company, this is unsurprisingly top of mind for him. How do these procedures perform at scale? In this context, it is clear that I need to structure my code to run as efficiently as possible. Especially if I decide to specialize in Data Science! Building a great algorithm is secondary to delivering a product or analysis in a timely manner.</p>
</div><!-- /.entry-content -->
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="http://getpelican.com/">Pelican</a></li>
<li><a href="https://codewithmosh.com/">Code with Mosh</a></li>
<li><a href="https://learnpythonthehardway.org/">Learn Python the Hard Way</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="https://github.com/kmannarbor">Github</a></li>
<li><a href="https://www.linkedin.com/in/alexmendiola/">Linkedin</a></li>
<li><a href="https://www.youtube.com/channel/UCWqk6iBabEXpEQqNSY3BdSw">Youtube</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-142770132-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>