Computational analysis techniques are transforming empirical legal scholarship. Two paradigms have emerged: law-as-code, which seeks to represent legal rules in a logical, executable format; and law-as-data, which leverages quantitative analysis of legal texts to reveal patterns and insights. This article surveys these approaches, emphasizing recent developments in large language models and generative artificial intelligence (AI). Law-as-code systems have enabled applications from tax preparation software to smart contracts, but realizing the vision of fully computational law has proven challenging. Law-as-data techniques like natural language processing and machine learning have charted the semantic relationship between courts and illuminated changes in judicial culture. Generative models showcase AI's explosive progress, with impressive feats like passing the U.S. bar example, but they also highlight limitations like factual inaccuracy and interpretability issues. Hybrid approaches integrating computational law, data science, and AI offer a promising research direction. As these tools spread, legal scholars can analyze more legal data than ever before, but they must remain cognizant of challenges like biased or low-quality data and linguistic/cultural limitations. Used judiciously alongside traditional methods, computational analysis has the potential to revolutionize empirical legal studies.